
Originally Posted by
WebDesignGeek972
Ok what CSS do I need to add to fix line breaks in DIV code? Here's what I'm trying to do: I want to create an image that is sliced in DIVs. It's a 3 columns 3 row slice. So, I create code like so, but every row has a break that creates spaces between the row of images (the columns don't have any problems). What am I doing wrong? And what CSS do I need to use to fix it? Here's a sample of the code:
Each row of images horizontally is fine - there are no breaks in the images. But going from one row to the next, there are. How to fix?
You could also try font-size: 0px or float: left - both work:
HTML Code:
<style type='text/css'>
#fred {width:330px; height:420px; outline:solid 1px #f00; font-size: 0px}
#fred img {float:left; width:100px; height:100px; border:0; margin:0px; padding:0}
</style>
</head>
<body>
<div id='fred'>
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
<img src="http://subdomain.localhost/thumb/chain_letter_thumb.jpg" alt="image name" />
/div>
Bookmarks