View Full Version : question about images

12-16-2009, 08:58 AM
i have a design which i sliced in photoshop and as per the requirement i had to slice into 5 images and each slice had a different width however the total of the 5 images is 900px and fixed height of 200px

so each of the 5 images have a height of 200px and width with different values which add upt0 900px which is the total width of the photoshop design

i used a center layout page with the wrapper set to 900px, when i used 5 image tags all the images were sitting next to each other except for the last 5th image which was starting in the next line however in the design all should appear next to each other, i total width of the div which holds the images is
900px and also the total width of each images is 900px.

so i created 5 inner divs inside a containing div and i set the width and height of the inner divs based on the width and height of each images and this worked fine

however i tried another method of using 5 img tags inside just 1 div and in the css i mentioned
#div img{
float: left;

after i used this method all the images were sitting next to each other as per the design, if i remove float: left; then the last image starts in a new line

any reason why when i was using all 5 img tags with giving float: left the last image was starting in a new line as the total width is 900px


12-16-2009, 05:46 PM
Even floated images will start on a new line if they run out of room in their containing element. Are you sure it wasn't maybe just 1 or 2 pixels too wide?

12-16-2009, 06:39 PM
Hello sudhakararaog,
IE6 has a number of bugs that can be invoked when using floats. Hard to say what your dealing with without seeing your test site.
Here is a list of bugs and their fixes (http://www.positioniseverything.net/explorer.html), maybe that will help you.