>>> http://www.loudjoy.com/styled_div.html

>> Option 2: add... #newest{float: left; display: inline;}

> If you have time, I'd love a brief explanation of what this is doing.
>  I'm afraid I don't really understand it and I wasn't aware of 
> alternatives to using clearing elements in a situation like this.

There are quite a few CSS methods for 'containing floats'[1], which is
what this is all about. Relevant articles, CSS-specs and
demos/descriptions are linked to in that page.


Short about 'float: left/right;':

A float will always expand in height to contain included floats, as long
as we don't restrict its dimensions by setting a height on it.
I base probably some 75% of all 'float containment' solutions on this
simple fact.

IE/win has a nasty bug which affects side-margins on floats - they tend
to be double the given value. The addition of 'display: inline' on the
float - which doesn't make sense at all since floats can't be 'inline' -
will cure that particular 'margin doubling on floats' bug in IE/win.


IE/win has more bugs (of course) - that also affects floats, so you may
want to study some float-constructions where workarounds for these are
demonstrated and explained in some details[2][3].

In-depth understanding of how floats work will make it possible to lay
out the most elaborate designs in a mostly cross-browser stable way.

----

I only use 'position: absolute' for the odd occasion where I need to
place something in a completely different part of a page. Most other
'positioning-problems' are solved by manipulating floats around.
This is why I added the third option: a 'positioned and removed float'
to solve your original case.

regards
        Georg

[1]http://www.gunlaug.no/contents/wd_example_01.html
[2]http://www.gunlaug.no/contents/wd_demo_float_01.html
[3]http://www.gunlaug.no/contents/wd_demo_float_02.html
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to