I have the following navigation bar in HTML5:
<div id = 'nav'>
<ul>
<li>
<a href = ''>HOME</a>
</li>
<li class = 'final_nav'>
<a href = ''>FAQ</a>
</li>
</ul>
</div>
Styled with this CSS:
#nav {
border: 1px solid #000;
padding: 0.1px;
background-color: #E5E5E5;
}
#nav li {
border-left: 1px solid #000;
padding: 20px;
display: inline;
}
.final_nav {
border-right: 1px solid #000;
}
#nav a {
display: block-inline;
}
But the left & right borders don't align with the top & bottom ones:
Why is this?
Thanks
#nav li {
border-left: 1px solid #000;
padding: 17px;
display: inline;
}
This should fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With