Topic: floating multiple images

what's the css code for floating multiple images?

Vote up Vote down

Re: floating multiple images

Do you mean floating several images on the same line?
CSS

img.left { float: left; }

HTML

<img class="left" src="image1.jpg" alt="Image 1">
<img class="left" src="image2.jpg" alt="Image 2">
<img class="left" src="image3.jpg" alt="Image 3">

Last edited by Wickham (January 20, 2010 7:47 am)

Vote up Vote down

Re: floating multiple images

Wickham wrote:

Do you mean floating several images on the same line?
CSS

img.left { float: left; }

HTML

<img class="left" src="image1.jpg alt="Image 1">
<img class="left" src="image2.jpg alt="Image 2">
<img class="left" src="image3.jpg alt="Image 3">

No. I meant in a straight line across the screen!

Vote up Vote down

Re: floating multiple images

Please don't answer him anymore, rudeness should be punished.

Vote up Vote down

Re: floating multiple images

Eric wrote:

Please don't answer him anymore, rudeness should be punished.


Eric, I think you misunderstood my answer. I'm trying figure out how to float multiple images across the screen!

Vote up Vote down

Re: floating multiple images

You mean float around randomly, like soap bubbles or something?  Or do you mean the CSS term 'float'? If the latter is the case, then your answer is up there.

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: floating multiple images

Andrea wrote:

You mean float around randomly, like soap bubbles or something?  Or do you mean the CSS term 'float'? If the latter is the case, then your answer is up there.

Andrea, I want the images to float from left to right across the screen.

Vote up Vote down

Re: floating multiple images

Well that's what Wickham's code will do, float your images across the page next to each other on the same line.

Vote up Vote down

Re: floating multiple images

Unless, of course, you want them to float like soap bubbles, but in an orderly fashion just from left to right.......

We are talking CSS positioning float here.  If you really mean a different kind of float, please be specific.

But if you also mean CSS float - then what virtual said what Wickham said - of course - unless you have too many images or they are too large, that what doesn't fit will drop down to the next row.

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: floating multiple images

Perhaps Kaymeis didn't understand that float is a technical CSS coding term.

If he means images that move across the screen then this could be done with javascript, jQuery or Flash.

Hotscripts http://www.hotscripts.com/category/java … -programs/ might have a suitable script.

This page http://www.hotscripts.com/category/java … nimations/ lists two "Bouncing Images" scripts that might be what is wanted. I don't know whether they can be controlled in a straight line or whether they bounce up and down as well.

Vote up Vote down