floating divs

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

floating divs

Post by s.dot »

is there a way to keep floating divs from breaking down to the next line when you don't use overflow:hidden

ie

Code: Select all

<div float left></div>
<div float left></div>
<div float left></div>
in psuedo code, of course.

lets say a I put a reallly long text line in div 1.... the other two divs break down to the next line :( I would rather have them just scroll over to the right!
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

In FF (where they meet the box-model standards) that doesn't ahppen.

The W3 say that if the content of a floated div is larger than the size of the div, then the content should simply be permitted to overflow the box. Even with overflow: visible explorer ignores this.

It's long know that IE don't follow that standard and simlply resize the box.... even worse, IE does not seem to know when it has resized a box, which leads to more problems I'm not going to get into.

To answer your question. There's no "clean" way to do it. Either use overflow: hidden or there's a white-space setting I can't remember (something like break-word).

Note: Opera also doesn't meet this standard.

Yep, it sux :(
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

That sucks.

I would like it to behave just like

Code: Select all

<tr>
    <td></td>
    <td></td>
    <td></td>
</tr>
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply