Click to See Complete Forum and Search --> : Problem with positioning a li


popcop
08-21-2009, 04:33 AM
#navcontainer {
list-style:none;

}

#leftmenu a {
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
color:#FFF;
text-decoration:none;
border-top:dotted #ffffff thin;
display:block;
padding:5px 0 5px 3px;
list-style: none;
width:185px;

}


#leftmenu li {
list-style-type: none;
list-style-position:left;

}


#leftmenu a:hover {
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
color:#FFF;
background-color:#333;
text-decoration:none;
border-top:dotted #ffffff thin;
display:block;
padding:5px 0 5px 3px;
list-style: none;

}


<div id="navcontainer">
<ul id="leftmenu">
<li><a href="#" title="1">1</a></li>
<li><a href="#" title="2">2</a></li>
<li><a href="#" title="3">3</a></li>
<li><a href="#" title="4">4</a></li>
<li><a href="#" title="5">5</a></li>
<li><a href="#" title="6">6</a></li>
<li><a href="#" title="7">7</a></li>
<li><a href="#" title="8">8</a></li>
<li><a href="#" title="9">9</a></li>
<li><a href="#" title="10">10</a></li>

</ul>
</div>

im using the above code for a menu ive set up using a list... the only problem im have is that the menu is bedded in from the left like a normal list would be... how can i get it to sit normal in the div

any suggestions?

Hemmer
08-23-2009, 08:50 AM
You need to set the padding-left attributes for your ul element to be zero:

ul {
padding-left: 0px;
}

Also list-style-position:left; isn't valid, see here (http://www.w3schools.com/CSS/pr_list-style-position.asp). There is a good article on styling lists at A List Apart (http://www.alistapart.com/articles/taminglists/).