Saturday, 17 August 2013

Two and inside is this OK to use?

Two and inside is this OK to use?

I have this horizontal list in XHTML:
<div id="navcontainer">
<ul>
<li><a href="#">Milk</a></li>
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
</ul>
<br/>
<ul>
<li><a href="#">Milk</a></li>
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
</ul>
</div>
And the CSS file is this :
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
#navcontainer ul li { display: inline; }
#navcontainer ul li a
{
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #005546;
}
#navcontainer ul li a:hover
{
color: #fff;
background-color: #005546;
}
The output in the browser is OK, i just want to have the one block of
..
under the other, so i want to know if by using the
tag and this code in general is the right thing to do.

No comments:

Post a Comment