What you are doing is floating the div, not the images inside the div. You should target the images.
.float img {float: left; margin: 0 10px;}
<div class="float">img img img img</div>
That would be the general idea.
rexibit
Junior Poster in Training
55 posts since Jun 2008
Reputation Points: 15
Solved Threads: 4
Hello evank,
What you need, - is a container you already have, and images that will fill the line.
*[ you should consider closing your img tags properly depending on DTD specified.]
If you plan for images to be scrollable with the browser-built horizontal scrollbar. You can use the following CSS:
#yourImageContainer{
width: /*your desired area width*/;
height:/*images height, or at least 1px higher than your images */;
overflow: auto;
white-space: nowrap; }
It will make your DIV image container display a horizontal scrollbar.
But in case you plan to scroll them with javascript, than overflow:hidden is the way to go.
/inf.:
Images are inline elements. They're allowed to break in a new line, just like text content does, in case it doesn't fit in existing available width.
Regards
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80