N
N
Noooodle2020-09-11 08:54:00
Layout
Noooodle, 2020-09-11 08:54:00

How to make a hat if the logo is in the middle?

Friends, I just started to study layout, my task is to make such a header.
5f5b10d160e47864476680.jpeg

How is it better to do this if the menu is converted into a hamburger on a mobile phone?
5f5b10dcb7f5f459641755.jpeg

Initially, I wrapped the whole header in ul, then I decided to break everything into col (the first two paragraphs, the logo, the last paragraphs? where is the hamburger?), but it turns out crooked :D

Thanks to everyone who responds!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
WapSter, 2020-09-11
@Noooodle

Bad option. Duplicate the menu.
Worse. Using js, move the block with the logo along the DOM tree.
Normal. Make the logo relatively positioned. Insert in the center, in the mobile version make it static or just change the position.

A
Arseny, 2020-09-11
Matytsyn @ArsenyMatytsyn

You can make a grid for the header, where there will be 3 columns (auto [logo width] auto), where the navigation will take from the first to the last column of the first line. And the logo will occupy the second column. Repeat the navigation scheme to form a negative space under the logo, where it should be.
You will most likely need to tinker with mouse events (this is described at the CSS level), removing event trapping from element containers and assigning them to nested ones.

V
Vladimir Korotenko, 2020-09-11
@firedragon

Here is right for your case
https://habr.com/ru/company/ruvds/blog/518514/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question