So I've got this very typical layout
.logo
can be of any height and I need the nav & ul & li & a
inside the .container
to take up 100% of it's width.
SCSS
.logo {
font-size: 40px;
}
header {
background-color: tomato;
}
.container {
display: flex;
padding: 10px;
align-items: center;
}
nav {
margin-left: auto;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
display: flex;
li {
margin-right: 10px;
&:last-child {
margin-right: 0;
}
}
}
Markup
<header>
<div class="container">
<div class="logo">I'm logo</div>
<nav role='navigation'>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Clients</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
</div>
</header>
I've seen this question but the solutions offer either position: relative
on parent and position: absolute
on child, or fixed-height solutions.
Edit The goal is to have a
border-bottom that will be displayed right at the bottom of the container.