Answer the question
In order to leave comments, you need to log in
How to implement HTML structure according to BEM?
Hello! I ran into a problem: is it possible to create an element in a block that centers all the content of this block? Did it this way:
<div class="page__header">
<div class="page__wrapper">
<header class="header">
<div class="header__left-content">
<div class="logo">
<!-- Logo -->
</div>
</div>
<div class="header__right-content">
<ul class="nav">
<!-- Li -->
</ul>
<div class="header__search">
<!-- Input -->
</div>
</div>
</header>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Why create an element when you can create a block modifier?<div class="header header--center"></div>
<div class="page__wrapper">
<header class="header page__header">
<div class="header__left-content">
<div class="logo">
<!-- Logo -->
</div>
</div>
<div class="header__right-content">
<ul class="nav">
<!-- Li -->
</ul>
<div class="header__search">
<!-- Input -->
</div>
</div>
</header>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question