Web Hosting Talk







View Full Version : CSS Div Positioning


Rahil
10-25-2007, 02:21 AM
Hi everyone,

Can you take a look at http://www.investmentsociety.ca/test.html in IE and FireFox? Notice how the RSVP box on the right is overflowing? Do you know how I can fix that? I'm thinking it's something to do with float, clear, or overflow, but you guys are the experts.

Thanks for the help! :)

Steve_Arm
10-25-2007, 03:46 AM
Add this before the closing tag of <div class="content"> :

<br style="clear: both;" />

dollar
10-25-2007, 03:52 AM
Validation may give you some trouble from time to time with:

<br style="clear: both;" />

depending on the doctype you choose. You can also do:

<div style="clear: both;"></div>

or as I prefer setup a style within your global stylesheet:

div.clear {
clear: both;
}

and then add the div with:

<div class="clear"></div>

Rahil
10-25-2007, 09:16 AM
Tried that, doesn't work :( The div still acts the same!

The div uses the style "rsvp" and in rsvp I tried all the clear params, left, right, both, nothing fixes it.

Steve_Arm
10-25-2007, 09:30 AM
Works for me:
http://88.218.97.17:8080/test.html

Rahil
10-25-2007, 11:03 AM
Ah, Steve, you're right, the following works:

<br style="clear: both;" />

Thanks for all your help guys!