Answer the question
In order to leave comments, you need to log in
Align item not working inside flex container, why?
Trying to make up the header of the site, I came across an interesting effect ( Code ). I tried to make a flex item into a flex container, but align-items stopped working for .header-container . That is, the .logo and .menu elements are no longer centered vertically. If display: flex is removed from .menu, then the elements will begin to be centered, but why this happens, I have no idea.
Answer the question
In order to leave comments, you need to log in
align-items works for you. Just either remove the height from the logo, or center the logo in the container
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question