V
V
vvanyazz2021-06-08 12:44:28
css
vvanyazz, 2021-06-08 12:44:28

How to do po bam?

Let's say my header is divided into top and bottom and there is a menu at the top and bottom, so what is the right way to make names for the menu?
make special blocks for parts by type: top-header and make top-header__menu relative to it or what?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iBird Rose, 2021-06-08
@vvanyazz

why do you always forget that you can produce blocks any way and anywhere. nest blocks inside blocks as much as you like.
in your case, if your menu is too cumbersome, then make a separate independent block out of it.
which may not even apply to the header. those. inside .top-header you will have a .main-navigation or .main-menu block
and you can already use it not only in the header, but anywhere.

A
approximate solution, 2021-06-09
@approximate_solution

Make it a habit to add custom/additional styles like this

header class header
    nav class nav header__nav

where class="nav"you describe styles that apply only to navigation, allowing you to place the nav block anytime, anywhere. A header__navis responsible for positioning navinside the block header, since nav is a child element of the block header.
As a result, when you lay out the layout, you will get a bunch of independent blocks, and you will already do the grid + positioning by addingблок__элемент = позиционирование

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question