> In IE 6/7 the containing division needs an implicit width set: > /*7.0*/ > *:first-child + html div {width : 350px; } > /*6.0*/ > * html div {width : 350px; } > > reference :: on having layout > <http://www.satzansatz.de/cssd/onhavinglayout.html> > > Best, > ~d > > -- > :: desktop and mobile :: > http://chelseacreekstudio.com/ > >
Thanks for getting back so fast... I am reading through the hasLayout article now - very interesting. Slightly confused though - setting the width does solve the problem by fixing the width of the containing division so the p only stretches that far but that removes the point of floating that div in the first place. What I want (if it is possible) is to achieve a solution that allows me to right-align items (like the link in the example). I am only floating the div to make it automatically wrap to the contents width. Then I can right align children like the link against this container... sorry if that is a confusing explanation. I read that floating a div triggers hasLayout already but tested the same with zoom:1; to no avail... I don't understand why the width of the division changes when I add the paragraph - without it the div wraps as desired. I can set the width as per your solution and use JS to overwrite it to the width of its dynamic content each time but that just seems ugly... Much thanks for your expertise, Mark ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/