<div>s seem to behave differently

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

<div>s seem to behave differently

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Next time please choose right forum for your threads
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Depends on what exactly you plan on doing...

Display;

can help: http://www.devguru.com/technologies/css2/8085.asp
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: <div>s seem to behave differently

Post 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}
Post Reply