Struggling to align a container with a max width of 1100px within a full-width container? Here is the code snippet:
<div class="container-full">
<div class="container">
<nav>
<h1>Name</h1>
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</div>
</div>
The CSS styling for this structure:
.container-full {
width:100%;
background-color:blue;
}
.container {
width:1100px;
background-color:white;
}
nav {
display:flex;
justify-content:space-between;
align-items:center;
}
ul {
list-style-type:none;
padding:0;
display:flex;
}
Hmm, it seems like the issue may be related to the nav element being a flex-box. Let's explore solutions together.