473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Floated DIVS display differs FF/IE6

Having spent quite a while tweaking a design to appear as I want, and
everything looking good, I tried one last test -- and of course the result
differs between FF ("wrong") and IE6 ("right").

I tried Googling for an answer, but gave up after tutorial 27 (of 1.8
million), so I'm hoping one of the experts will be able to oblige!

The problem:

3 column layout, with left and right floated columns having a defined
width, and the centre with whatever's remaining.

If I then have a centre box containing floated DIVs, FF increases the
box's height such that the bottom is below that of the "longest" column,
whilst IE6 leaves the box as it "should" be.

I'd be grateful if someone could spare a few minutes to have a look and
advise the correct approach I should be taking for FF to render as
desired.

Test page is at http://www.horshamhc.co.uk/site07/floatboxtest.htm

CSS is at http://www.horshamhc.co.uk/site07/hhcstyles07.css
TIA

Pete
--
www.lightningnews.com Lightning fast anonymous usenet downloads for 5$ only !
Jul 31 '07 #1
2 1710
On 2007-07-31, Pete Horrobin <re*****@viause.netwrote:
Having spent quite a while tweaking a design to appear as I want, and
everything looking good, I tried one last test -- and of course the result
differs between FF ("wrong") and IE6 ("right").

I tried Googling for an answer, but gave up after tutorial 27 (of 1.8
million), so I'm hoping one of the experts will be able to oblige!

The problem:

3 column layout, with left and right floated columns having a defined
width, and the centre with whatever's remaining.

If I then have a centre box containing floated DIVs, FF increases the
box's height such that the bottom is below that of the "longest" column,
whilst IE6 leaves the box as it "should" be.

I'd be grateful if someone could spare a few minutes to have a look and
advise the correct approach I should be taking for FF to render as
desired.
The first child of <div id="txt3colContent"is another div. Add
"overflow: hidden" to the styles for that inner div.

What FF is doing here is correct. Your clearing div should clear all
floats in its block formatting context, which in this case _includes the
left and right columns_.

To make it clear only the floats in its containing block, which is what
you want, you need to promote its containing block to a block formatting
context root. The way to do this with fewest side-effects is to make
that containing block overflow: hidden.
Test page is at http://www.horshamhc.co.uk/site07/floatboxtest.htm

CSS is at http://www.horshamhc.co.uk/site07/hhcstyles07.css
Jul 31 '07 #2
Ben C <sp******@spam.eggswrote in
news:sl*********************@bowser.marioworld:

<snippage of original problem description>
>
The first child of <div id="txt3colContent"is another div. Add
"overflow: hidden" to the styles for that inner div.

What FF is doing here is correct. Your clearing div should clear all
floats in its block formatting context, which in this case _includes the
left and right columns_.

To make it clear only the floats in its containing block, which is what
you want, you need to promote its containing block to a block formatting
context root. The way to do this with fewest side-effects is to make
that containing block overflow: hidden.
>Test page is at http://www.horshamhc.co.uk/site07/floatboxtest.htm

CSS is at http://www.horshamhc.co.uk/site07/hhcstyles07.css
Thank you once again, Ben, you're still a star!

I had fallen back to an alternative using a <fx: whisper>table</fxjust
in case -- glad I won't now have to use it.

Pete
--
www.lightningnews.com Lightning fast anonymous usenet downloads for 5$ only !
Aug 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Zaka Ferenc | last post by:
Hi all, the page http://info.etr.elte.hu/divtest5.html looks as I expected in IE6 and Opera 7.11, but the floated divs float out of the containing blocks (divs) in NN7.1 and Opera 7.0 (what I...
3
by: Philip | last post by:
I am trying to make a bunched of left-floated divs that will be contained in a larger div. the floated divs all contain a left-floated img and text of varying sizes. If I don't set a height (or...
24
by: Thomas Mlynarczyk | last post by:
Hi, Here's what I have: <div> <img ...><br> Caption text </div> The div is floated left and has no width set, the content is centered, there are no margins or padding on the <img> (just a...
2
by: tasman.hayes | last post by:
I'm experimenting with converting a site from a table layout to CSS. I'm floating three DIVs in a row for the top of a website (a logo, navigation buttons and a email list signup box). The DIVs...
1
by: alex | last post by:
Hey all, May have missed this in the FAQ, advice or article links welcome. Have a content div with a navigation div floated left and an advertisement div floated right. I would like to have a...
2
by: rudicheow | last post by:
SHORT VERSION ============= I have a bunch of identical fixed-size single-celled tables that rest against each other horizontally thanks to "float:left". These tables are dynamically generated...
2
by: Ben C. | last post by:
Hi If I have a container div and inside the container div I float two divs (one left and one right), the containting div will collapse as the floated divs will no longer prop it up, meaning that...
1
by: yawnmoth | last post by:
I'd like to center two floated divs but am unsure of how to do so. Here's my code: http://www.frostjedi.com/terra/scripts/demo/div-float-center.html It seems like setting the width of the...
7
by: Ed Jay | last post by:
I have two divs. The left div is floated left and the right div is floated right. If the left div contains a single line, the left and right divs are on the same line (obviously). But...the left...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.