Ingo Chao wrote:
Georg Sørtun wrote:


Using 'overflow:auto/hidden' for containing floats is a lot of fun,
and in many cases it'll actually work. However, it is not a reliable solution, and has to be tested to death across browser-land - in each case.

So, I use it (at my own risk) - but I won't recommend it for anything but the simplest cases.


Georg, thanks for relieving my headaches.

You're welcome ;-)

In the end, we'll have another float clearing method with some hacks
 for IEMac, IE/Win5.5, 6, Opera8, and more. Oh, and IE7.

IE7 will probably solve itself (more or less) - in quirks mode.

Opera, Firefox and Safari are more problematic, as none of them are
predictable and stable when given complex layouts. They cut too many
corners, and they don't cut the same corners.

Just business a usual.

That's the fun part... :-)

Or the return of the solid clearer. It's really complex, that spiral.

Well, yes, it is complex, and hacking around in that mess only makes it
worse.

Clearing stuff isn't really a problem, but one sure need to know ones
way around these browser-specific "solutions" before releasing
"problem-solvers" into the wild for others to use.
Simple test-cases just won't do--unless that's all we'll ever create.

Using a *solid clearer* is often the only cross-browser reliable
solution - as long as any "HasLayout" hacks for IE/win are used in a
controlled way. Guess that's why I keep the old <br /> styled as clearer
in all my stylesheets--regardless of all the "smart solutions" that pops
up everywhere. However, one can mess up with *solid clearers* too.

The closest thing I have found for reliable float-containment is 'floats
expands to contain floats'. That one usually only require some minor
"fixes" for IE (win & Mac). However, I'm sure someone know how to mess
up that one across browser-land too.

My general recommendation is:
- avoid using CSS-definitions for something they are not *clearly*
created for--unless you know exactly what you're doing and how each
browser will handle it.
- think twice about methods that'll need hacks across browser-land in
order to work--unless such hacks are for IE/win only.
- don't rely on any browser's handling of anything as "the right
way"--unless it is _perfectly_ in line with the text in the latest
revision of the relevant standard.
- expect unclear statements in any W3C-standard to be changed in a later
revision. Standards rely on actual implementation across browser-land,
since W3C can't force any browser to implement anything.

regards
        Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to