Here's my HTML:

<div id="navigation">           
    <li><a href="index.html">Inicio</a></li>
    <li><a href="acerca.html">Quienes Somos</a></li>
    <li><a href="servicios.html">Servicios</a></li>
    <li><a href="portfolio.html">Portfolio</a></li>
    <li><a href="contacto.html">Contacto</a></li>           

And my CSS:

 position: absolute;
 top: 120px;    
 border: 2px solid #404040;
 background-color: #FFFFFF; 

#navigation li{
 list-style-type: none; 

*I don't know what's up with this text editor on this website :*

How can I make the list appear very near the left edge of the Div tag, right now it's appearing in the middle very ugly.

  • Post a live page. No one can debug snippets. Nathan Duran almost 7 years ago

3 answers

Mottie 1134

Just add this CSS:

#navigation ul {
 padding: 0;

And as for using the text editor, this site uses markdown - check out the unoffical faq

Answered almost 7 years ago by Mottie
position: absolute;
 top: 120px; 

where's the left value?

you need to specify both axes co-ordinates for a positioned element.

Answered almost 7 years ago by Tony Crockford

Margin and padding both on the div, the ul, and the li all play into the positioning relative to the div. You will want to look at the values for ul since most browsers indent that a bit by default. IIRC, there is some other property that IE uses which adds more indention, but I can't remember what that is at the moment.

Answered almost 7 years ago by kainosnous