Forum Moderators: not2easy

Message Too Old, No Replies

Extra Padding in div ul li

Where is it coming from?

         

Demaestro

5:07 pm on Aug 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hoping someone can help me track this down.

I have a div that has a ul in it.

I have the ul displaying inline.

I have all padding and margins set to 0px for all elements but I am getting a small amount of padding to the left of each image in the ul... anyone have any ideas where it is coming from or how to get rid of it?

All the images are the same height and their combined widths come out to 787px

<div>
<ul>
<li><img src="1" /></li>
<li><img src="2" /></li>
<li><img src="3" /></li>
</ul>
</div>

CSS

div {
text-align:left;
width:790px;
padding:0px;
margin:0px;
}

ul {
padding:0px;
margin:0px;
}

li {
display:inline;
padding:0px;
margin:0px;
}

img {
padding:0px;
margin:0px;
}

Demaestro

5:22 pm on Aug 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well for poops sake.... I can't believe this is what it was but it is the white space between the li tags.

I removed the white space between the tags and that solved it.

<div>
<ul
><li><img src="1" /></li
><li><img src="2" /></li
><li><img src="3" /></li
></ul>
</div>

So the above took care of the problem.... hate white space issues.