Page 1 of 1

<div>s seem to behave differently

Posted: Fri Sep 30, 2005 9:31 am
by mjseaden
Hello,

I have the following code:

Code: Select all

<div class="float">
  <img src="image1.gif" width="100" height="100"
  alt="image 1" /><br />
  <p>caption 1</p>
</div>

<div class="float">
  <img src="image2.gif" width="100" height="100"
  alt="image 2" /><br />
  <p>caption 2</p>
</div>

<div class="float">
  <img src="image3.gif" width="100" height="100"
  alt="image 3" /><br />
  <p>caption 3</p>
</div>
On one site, with the same browser, this produces 3 images side-by-side.

On my page, they are stacked on top of each other.

Is there any parameter that determines the behaviour of <div> in this way?

Many thanks

Mark

Posted: Fri Sep 30, 2005 9:39 am
by Weirdan
Next time please choose right forum for your threads

Posted: Fri Sep 30, 2005 9:40 am
by hawleyjr
Depends on what exactly you plan on doing...

Display;

can help: http://www.devguru.com/technologies/css2/8085.asp

Re: <div>s seem to behave differently

Posted: Fri Sep 30, 2005 9:41 am
by Weirdan
mjseaden wrote: On one site, with the same browser, this produces 3 images side-by-side.

On my page, they are stacked on top of each other.

Is there any parameter that determines the behaviour of <div> in this way?
this css would make those divs appear side by side:

Code: Select all

div.float {float:left}