A
A
Artyom2021-10-04 12:33:34
BEM
Artyom, 2021-10-04 12:33:34

Through which class should I position the Bam element?

Let's say I have a menu like this:

<nav class="menu">
        <ul class="menu__list">
          <li class="menu__item"><a href="" class="menu__link">Visiting</a></li>
          <li class="menu__item"><a href="" class="menu__link">Explore</a></li>
          <li class="menu__item"><a href="" class="menu__link">Video</a></li>
          <li class="menu__item"><a href="" class="menu__link">Gallery</a></li>
          <li class="menu__item"><a href="" class="menu__link">Tickets</a></li>
          <li class="menu__item"><a href="" class="menu__link">Contscts</a></li>
        </ul>
      </nav>


Judging by the documentation, I should only set the color/frame, etc. through the "menu__item" property. But positioning should be done differently, tell me, how exactly in my case is it better to do it?

And how to position the menu block itself, because it should not affect other blocks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2021-10-04
@MrDecoy

Any outer geometry for a block is set via the mix
. So, they menu__itemcan have margins, such as margins, for example, because they are elements of the block, but the block itself menumust be positioned via the mix.
If, say, it is .menuinserted into .header, then you need to additionally .menudefine the class .header__menu, in which to set the positioning.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question