- From: stylo~ <list@swordandpen.com>
- Date: Tue, 13 Aug 2002 12:42:54 -0400 (EDT)
- To: <www-style@w3.org>
I strongly second this idea and hope those in charge of floats will look at this deficiency in the spec that is harming the adoption of CSS by developers. Floats busting out of their containers, overlapping their container's borders, and interfering with subsequent sections is not only counterintuitive, but a continual headache that makes the use of floats a nightmare. I hear this repeatedly on developer boards/lists. Normally you have sections, often with borders, and floated divs/images within them that you quite rightly want to remain within them. The w3c pic http://www.w3.org/TR/CSS2/images/float2p.gif demonstrates exactly what is NOT wanted 99% of the time, and what developers are continually asking for workarounds to. -And what is forcing them to maintain table layouts and the align attribute. Min-height and other CSS attempts to overcome this deficiency in the spec just don't work. With dynamic pages and image sizes, this deficiency is more pronounced. The fact that garbage code is necessary to work around the spec as-is (<div style="clear: both;"> </div>) in order to get the effect that authors normally want indicates that *there is a deficiency* that really needs to be addressed. The best way to correct this deficiency is to add a property as suggested, or maybe to make the clear property work on floats to force a break afterwards, and the container they sit in to stretch, just as the sample garbage code does. I think float containment should have been the default behavior and cannot for the life of me figure out why it wasn't - floated elements can be placed outside text containers and the text will flow nicely around the floats as with align="left", so no loss -, but better late than never. With the suggested solution added to the spec, we get two float options and, most importantly, the one we normally need! Anyone designing pages of even moderate complexity will appreciate a solution to this deficiency in the float spec. One last point: there has been so little use of floats to date because of problems, it is wise that a solution be included now so it is there as people come onboard fully with CSS layout. -And to get the stragglers onboard who are sticking to table layouts and align until this, vertical centering, and a few other issues are resolved. randall~
Received on Wednesday, 14 August 2002 04:19:26 UTC