{"id":21,"date":"2010-07-26T14:57:17","date_gmt":"2010-07-26T19:57:17","guid":{"rendered":"http:\/\/www.marcblase.com\/blog\/?p=21"},"modified":"2011-04-13T11:26:57","modified_gmt":"2011-04-13T16:26:57","slug":"css-clearfix-hack-new-method","status":"publish","type":"post","link":"https:\/\/ma.rcbla.se\/blog\/2010\/07\/css-clearfix-hack-new-method\/","title":{"rendered":"CSS Clearfix Hack &#8211; New Method"},"content":{"rendered":"<p>When a parent div has floated children div containers, apply clearfix class to parent container so the children floats are cleared and the parent container&#8217;s height is correct.<br \/>\n<code><br \/>\n\/* new clearfix *\/<br \/>\n.clearfix:after {<br \/>\nvisibility: hidden;<br \/>\ndisplay: block;<br \/>\nfont-size: 0;<br \/>\ncontent: \" \";<br \/>\nclear: both;<br \/>\nheight: 0;<br \/>\n}<br \/>\n* html .clearfix             { zoom: 1; } \/* IE6 *\/<br \/>\n*:first-child+html .clearfix { zoom: 1; } \/* IE7 *\/<br \/>\n<\/code><\/p>\n<p>New clearfix method thanks to <a href=\"http:\/\/perishablepress.com\/press\/2008\/06\/18\/css-hackz-series-clearing-floats-with-the-clearfix-hack\/\">Perishable Press<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a parent div has floated children div containers, apply clearfix class to parent container so the children floats are cleared and the parent container&#8217;s height is correct. \/* new clearfix *\/ .clearfix:after { visibility: hidden; display: block; font-size: 0; content: &#8221; &#8220;; clear: both; height: 0; } * html .clearfix { zoom: 1; } [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12,3],"tags":[4],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-coding","category-css-coding","category-discoveries","tag-css"],"_links":{"self":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":4,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}