I'm currently working on implementing responsive design for a website. My main challenge right now is ensuring that the navigation menu stretches to the total width without any padding issues on the last element ("Equipo"). I want this element to reach the border seamlessly. Can anyone provide guidance on how to achieve this?
HTML:
<header class="mainHeader">
<nav><ul>
<li><a href="#" class="menuActual">Inicio</a></li>
<li><a href="#">Obras</a></li>
<li><a href="#">Personas</a></li>
<li><a href="#">Búsqueda Avanzada</a></li>
<li><a href="#">Equipo</a></li>
</ul></nav>
</header>
CSS:
.mainHeader nav {
width: 100%;
height: 30px;
margin: 1% 0;
}
.mainHeader nav ul {
list-style: none;
margin: 0 auto;
width: 100%;
}
.mainHeader nav ul li {
float: left;
display: inline;
width: 20%;
}
ul {
padding-left: 0;
}
.mainHeader nav ul li a:link, .mainHeader nav a:visited {
width: 80%;
height: 22px;
display: inline-block;
padding: 4px 0;
text-align: center;
color:#FFFFFF;
background-color:#2e2e2e;
border-left:5px solid #2e2e2e;
}
If you'd like to take a look at the temporary web file, here's the link: Thank you for your help!