Answer the question
In order to leave comments, you need to log in
Why is the layout of this element floating? How to fix?
I am currently taking a PHP training course and doing assignments for a training project.
Unfortunately, my knowledge of layout and CSS is very superficial, and I just can’t figure out why my layout is floating? The first option is a training page on pure HTML + CSS, everything is displayed exactly
https://i.imgur.com/tdz4EGK.jpg
And the second option is the code copied from this page, which is loaded as a php template. The only thing changed in the code is the substitution of values, depending on the requested id. That is, I didn’t even touch HTML or CSS. But for some reason (even if I just load pure HTML code as a php template), my layout floats.
https://i.imgur.com/wyjdtrl.jpg
Tell me how to fix this?
Just in case, I will attach a description of the styles "nav" , "nav__list" and "containter" :
.nav {
background-color: #ffffff;
border-bottom: 1px solid #e1e6e7;
}
.nav__list {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
list-style: none;
.container {
width: 1110px;
margin: 0 auto;
padding: 0 15px;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question