A
A
Alexander2021-06-12 20:03:37
css
Alexander, 2021-06-12 20:03:37

How to align a block exactly in the center?

There are 3 blocks, logo, navigation and menu with icons.
It is necessary that the block with navigation is exactly in the center. But when I use justify-content: space-between, and set a larger width for the right block, the nav moves to the left of the logo, which can be fixed, preferably without position and margin. I will be grateful for help
60c4e86c6e06b499768491.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Froggyweb, 2021-06-12
@Froggyweb

justify-content: space-between - 'this is about equal distances between blocks inside the flex, not in the center of the wrapper

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question