I like the irony in this… after my mention yesterday of pushing html around for almost a decade, I hit an obstacle laying out a footer in the new world of Table-free markup. I wrote and manipulated a pile of javascript and css to try and push a footer down beneath two “float:left” divs … if you’re familiar with the Float property, it has a strange way of causing its parent to stop inheriting its contents height and width … the purpose of float:left (or right) is to allow following (or previous in the case of right float) content to wrap around it (similar to when you align-left an image inside a paragraph). This is useful when you’re creating columns of content. The annoyance comes in when you’d like that “next” piece of content to stop wrapping up around the floated element. This is where the “clear float” css class comes in. After spending probably 2+ hours going around and around with trying to layout my footer, it was a simple css style, “clear:left” that did the trick I was looking for. I had seen the ‘clear’ property forever, but it never clicked for me. I haven’t been using the ‘float’ property very long either, so that may be why I was unfamiliar with its powerful counterpart … in essence the “clear” property breaks the chain of the float property to rather start its own new line.
Clear: Float
Discussion
We want to hear what you have to say. Do you agree? Do you have a better way to approach the topic? Let the community know by joining the discussion.
-
http://rlmansheim.com Rob
-
http://rlmansheim.com Rob
-
http://www.oastler.ca JamieO
-
http://www.oastler.ca JamieO
-
http://www.oastler.ca JamieO
-
http://www.oastler.ca JamieO
-
http://www.oastler.ca JamieO
-
http://www.oastler.ca JamieO
-
http://cssgirl.com Lindsey
-
http://cssgirl.com Lindsey
-
http://atrickdesign.com Pat
-
http://atrickdesign.com Pat
-
http://www.gomedia.us Wilson
-
http://www.gomedia.us Wilson
-
andre
-
andre
-
andre
-
andre
-
Nicole
-
Nicole
-
joel
-
joel
-
Duluoz
-
Duluoz
-
Jon Thomas
-
Jon Thomas
-
http://o3b.com Guillo
-
http://o3b.com Guillo
-
http://www.citeulike.org/profile/apekoff Heinnakix
-
http://www.citeulike.org/profile/apekoff Heinnakix
-
lynguyen
-
lynguyen
-
http://www.airwalk-design.com/ Web & Graphic Design
-
Matt
-
http://www.discount-louis-vuitton.com/louis-vuitton-handbags.html louis vuitton handbags
-
http://www.usa-basketball-shoes.com/Vince-Carter-shoes.html Vince Carter Shoes
-
http://www.discount-louis-vuitton.com/louis-vuitton-handbags.html louis vuitton handbags
-
http://www.discount-louis-vuitton.com/louis-vuitton-handbags.html louis vuitton handbags
-
http://vibram4u.com/ moncler outlet store
-
http://vibram4u.com/ moncler outlet store
-
http://www.moncler-down-jackets.com moncler down jackets
-
http://www.moncler-down-jackets.com moncler down jackets
-
http://www.air-jordan-12.com/ air jordan 12
-
http://vibramshoesonline.com/ vibram fivefingers shoes
-
http://vibramshoesonline.com/ vibram fivefingers shoes
-
l1528557
-
http://www.gucciwebbag.com/gucci-ladies-web-medium-tote-211936-ftatg-9791-p-282.html gucci web
-
http://www.gucciwebbag.com/gucci-ladies-web-medium-hobo-211934-ftatg-9791-p-157.html ladiesweb
-
http://www.facebook.com/profile.php?id=788233882 Xylude Xaalud
-
http://www.atheistunderworld.com/ BenTegland

