Hello,
I am creating a simple navigation bar using a list.
My anchor tags inside each list item have a background and margin. The
problem is they are overlapping.
I then added to the li tag margin-top: 20px.
The problem is that the bottom background of the last element
disappears.
I think I might doing something wrong on my styling because when I fix
something, something else gets wrong.
Could someone, please, help me out?
HTML:
<ul id="wmNavigation" class="Bar">
<li>
<a title="Page1" href="http://www.name.com/page1">Page1</a>
</li>
<li>
<a title="Page2" href="http://www.name.com/page1">Page2</a>
</li>
<li>
<a title="Page3" href="http://www.name.com/page1">Page3</a>
</li>
<li>
<a title="Page4" href="http://www.name.com/page1">Page4</a>
</li>
</ul>
CSS:
ul.Bar {}
ul.Bar li
{
font: normal 1.2em Verdana, Geneva, sans-serif;
letter-spacing: 0.1em;
margin-top: 20px;
}
ul.Bar li a
{
background-color: #202020;
color: #E2E2E2;
padding: 4px 10px 6px 12px;
text-decoration: none;
}
ul.Bar li a:link , ul.Bar li a:visited {}
ul.Bar li a:hover, ul.Bar li a:active, ul.Bar li a:focus
{
background-color: #303030;
}
Thanks,
Miguel