Here's my HTML:

<div id="navigation">           
  <ul>
    <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>           
  </ul>         
</div>

And my CSS:

#navigation{    
 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 over 6 years ago

3 answers

Mottie 1134
1
point

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 over 6 years ago by Mottie
0
points
position: absolute;
 top: 120px; 

where's the left value?

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

Answered over 6 years ago by Tony Crockford
0
points

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 over 6 years ago by kainosnous