I am trying to create a basic navigation bar using an unordered list, but for some reason I cannot get the bullets to leave.
I was looking for a solution on Google, and it seems to me that it SHOULD work, but I think that I could ruin something that is not related to the ul style, which in turn prevents the ul style from being applied.
Here is the relevant html:
<div id="nav"> <ul> <li><a href="index.html">Home</a></li> <li><a href="about.html">About Us</a></li> <li><a href="example.html">Examples</a></li> <li><a href="contact.html">Contact Us</a></li> </ul> </div>
and here is the CSS:
#nav ul { list-style-type: none; position: absolute; top: 10px; right: 0; margin: 0; padding: 0; } #nav ul li { float: left; } #nav ul li a { display: inline; float: left; padding: 8px 5px 3px 5px; margin-right: 5px; background-color: #034a7f; color: #fff; font-weight: bold; text-decoration: none; } #nav ul li a:hover { padding-top: 12px; background-color: #075a97; }
RyanE source share