Answer the question
In order to leave comments, you need to log in
How to center a logo with flexbox?
I get the logo moving to the left when you insert menu blocks from the right. How to solve the problem? To keep the logo from floating back and forth? Here is the code itself:
.header { width: 1260px; margin: 0 auto; height: 350px; display:flex; justify-content: space-between; align-items: baseline; }
Answer the question
In order to leave comments, you need to log in
This will not work with Flexbox, you either need to make a logo with absolute positioning, or blocks with buttons
What do you need? What would the logo be immediately to the left of the menu? Then set it to margin-left: auto;
A if you need the logo to always be on the right, regardless of the menu, then add either to it order: 1
or to the rest of the elements, but don't add anything to the logo. I don't remember exactly how :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question