floating divs

JavaScript and client side scripting.

Moderator: General Moderators

floating divs

Postby s.dot » Mon Oct 31, 2005 1:32 pm

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

ie

Syntax: [ Download ] [ Hide ]
<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!
User avatar
s.dot
Tranquility In Moderation
 
Posts: 4990
Joined: Sun Feb 06, 2005 8:18 pm
Location: Indiana

Postby Chris Corbyn » Mon Oct 31, 2005 1:41 pm

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
Chris Corbyn
Breakbeat Nuttzer
 
Posts: 13098
Joined: Wed Mar 24, 2004 8:57 am
Location: Melbourne, Australia

Postby s.dot » Mon Oct 31, 2005 1:57 pm

That sucks.

I would like it to behave just like

Syntax: [ Download ] [ Hide ]
<tr>
    <td></td>
    <td></td>
    <td></td>
</tr>
User avatar
s.dot
Tranquility In Moderation
 
Posts: 4990
Joined: Sun Feb 06, 2005 8:18 pm
Location: Indiana


Return to Javascript

Who is online

Users browsing this forum: No registered users and 3 guests