https://codepen.io/vlasov-aleksandr/pen/WNbOyZO
the problem is when I am put the “position: fixed;” my nav bar change a size I can’t understand what is a problem where is conflict
This is because you are using flex-box layout which will try to minimize the width of the element. See this codepen https://codepen.io/shubhamcanmakecommit/pen/JjoJmrz
You must try setting a width in your flex-container(header).
1 Like
Hi Sockoro,
I agree with @ShubhamCanMakeCommit, you need to specify the width of your header.
add this at the top of your css:
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
then just add the following to your div with the class .header
position: fixed;
width: 100%;
Let me know if that worked or have any questions
1 Like