PDA

View Full Version : Lines



haveacigar
Jan 22nd, 2007, 09:22 PM
Hey,

I have a small problem I am using a code so that i can put lots of small images into one, so it looks like one big image, which is fine in ie, but for some reason firefox does it with gaps in between rows...

I know its something simple but i cant think of what it is.

Cheers

Ciggy



<style type="text/css">
#header{
width:1840px;
height:auto;
list-style:none;
}
#header li
{
position:relative;
float:left;
top:0px;
left:0;


}
</style>

<div id="header">
<script type="text/javascript">
<!--

header = 0;

while(header < 400)
{
header++;
document.write('<li><img src="images/images_')
document.write(header)
document.write('.gif" alt="" /></li>')

}

//-->

</script>
</div>

koyama
Jan 22nd, 2007, 09:59 PM
It's probably the space for descenders you are seeing. You need to declare


img {
display: block;
}
Take a look at Images,_Tables,_and_Mysterious_Gaps (http://developer.mozilla.org/en/docs/Images,_Tables,_and_Mysterious_Gaps) for the full explanation.

But where is the enclosing <ul>...</ul> ?

haveacigar
Feb 1st, 2007, 05:22 PM
waaa a reply..

It worked :) thank you very much :thumbsup: