Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Lines

  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lines

    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

    Code:
    <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>

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    It's probably the space for descenders you are seeing. You need to declare
    Code:
    img {
      display: block;
    }
    Take a look at Images,_Tables,_and_Mysterious_Gaps for the full explanation.

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

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    waaa a reply..

    It worked thank you very much


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •