Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My borders don't line up?

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: Navigation Bar Why is this?
Thanks

like image 439
LazySloth13 Avatar asked Oct 21 '22 12:10

LazySloth13


1 Answers

#nav li {
    border-left: 1px solid #000;
    padding: 17px;
    display: inline;
}

This should fix it.

like image 74
hackio Avatar answered Nov 02 '22 22:11

hackio