I need help excluding the margin setting for just one item in my navigation bar, specifically the last one labeled "Kontakt"
Here is the HTML code:
<nav>
<ul>
<li><a href="index.html">HJEM</a></li>
<li><a href="forum">FORUM</a></li>
<li><a href="doner.html">DONER</a></li>
<li><a href="servere.html">SERVERE</a>
<li style="margin-right: 0 !important;"><a href="kontakt.html">KONTAKT</a></li>
</ul>
</nav>
And here is the corresponding CSS:
nav {margin: 10px auto; width: 700px;}
nav ul {width: 700px; height: auto; list-style: none; float: left; padding:0;}
nav ul li a {
background: #FFFFFF;
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
font-weight: 300;
font-size: 18px;
text-align: center;
color: #717171;
text-decoration: none;
float: left;
padding: 8px 0;
width: 106px;
margin: 0px 10px 0 0;
}
nav ul li{ position:relative; float:left;}
nav ul li a:hover {background: #f1f1f1;}
nav ul li ul.submenu {
position: absolute;
width: auto;
display:none;
top: 35px;
}
nav ul > li:hover > ul {
left: 0;
display: block;
}
If you want to know more about centering a navigation bar, check out this link
Feel free to visit our website at htttp://hjortefjellet.com for more information