Having an issue where the navigation elements are expanding vertically outside of their parent container. Specifically looking for a solution to prevent the <a>
tags from extending beyond the boundaries of the wrapping <nav>
parent element.
View this image highlighting the problem.
nav {
padding: 0em 1em 0 0;
border-bottom: 1px solid white;
}
.head nav a {
padding: .5em .5em;
font-size: .9em;
transition: all 0.3s;
border-bottom: 1px solid transparent;
}
.head nav a:hover {
border-bottom: 1px solid white;
}
<nav>
<a href="">Latest News</a>
<a href=""> Upcoming Events</a>
<a href="">Official </a>
<a href="">Domestic Rowing</a>
<a href="">High Performance</a>
<a href="">Coaching</a>
<a href="">Resources</a>
</nav>