Forum Moderators: not2easy
Welcome to WebmasterWorld [webmasterworld.com]
I just tried to replicate this but it looked fine in IE.
The code I used was...
<div style="border:1px solid red; width: 500px;">
<img style="float:right" src="image.jpg">
<img style="float:right" src="image.jpg">
<img style="float:right" src="image.jpg">
<img style="float:right" src="image.jpg">
hello
</div>
Could you post a code snippet like this that demonstrates your problem?
I tried to replicate it using the code in post #2 and an image.jpg that was 200px wide. I tried floating the images left and right. But the browser always wrapped the images properly at the edge of the div.
So either Jeremy is doing something different to me or its a bug that has been fixed in my version of IE (version 6.0.2800.1106)
the CSS is as follows
.imgTable { float:left; margin: 0 1em; }
.container {
width: 480px;
padding: .5em;
margin: .5em 0;
border: 1px solid #804040;
}
.Header { text-align: center; font-size: 1em; font-weight: 600; color: #804040;}
and the html is as follows. The problems occur when I add more than 4 images. In IE they contiue to the edge of the screen, but not in the other browsers. I solved the problem by changing the float:left to float: right.
<div class="container">
<div class="Header">Whatever the heading is</div>
<div class="imgTable"><img src="?.jpg" width="80" height="110" alt="" /></div>
<div class="imgTable"><img src="?.jpg" width="80" height="110" alt=""></div>
<div class="imgTable"><img src="?.jpg" width="80" height="110" alt=""></div>
<div class="imgTable"><img src="?.jpg" width="80" height="110" alt=""></div>
<div class="clearR"></div>
</div>
I figure I could cut out all the divs and just have one (imgTable), followed by the images, but I figured that was not the problem here.
The IE I use is 6.0.2800.1106 etc.