I cannot figure out how to make a child element (#child3) fill it's parent container both vertically and horizontally.
I've tried 100 different ways with and without Flexbox but I cannot figure out how to do this. Anybody know how this could be accomplished ?
#container{
height: 50vh;
width: 50%;
min-width: 500px;
}
#container nav{
height: 5rem;
}
#container nav ul{
height: 100%;
padding-left: 1rem;
display: flex;
}
#container nav ul li{
display: flex;
align-items: center;
padding: 0rem 2rem;
height: 100%;
}
#container nav ul li:first-child{
margin-left: -1rem;
}
#container nav ul li:last-child{
margin-left: auto;
}
#child3{}
<section id="container">
<nav>
<ul>
<li id="child1">Settings</li>
<li id="child2">Account</li>
<li><span id="child3" class="material-icons">close</span></li>
</ul>
</nav>
</section>