CSS Floats 101<\/a><\/li><\/ul>\n\n\nBrowser Support<\/h3>\n\n\n
The clear<\/code> property works in all browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"The clear property is directly related to floats. If the element can fit horizontally in the space next to another element which is floated, it will. Unless you apply clear to that element in the same direction as the float. Then the element will move down below the floated element. Here’s a simple example of […]<\/p>\n","protected":false},"author":1036,"featured_media":0,"parent":13915,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-almanac-single.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":14051,"url":"https:\/\/css-tricks.com\/almanac\/properties\/f\/float\/","url_meta":{"origin":14027,"position":0},"title":"float","date":"September 5, 2011","format":false,"excerpt":"The float property in CSS is used for positioning and layout on web pages. A common usage might be floating an image to one side and letting text wrap around it. .intro-img { float: left; } Syntax float = block-start | block-end | inline-start | inline-end | snap-block | \u2026","rel":"","context":"With 19 comments","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/02\/print-layout.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":320118,"url":"https:\/\/css-tricks.com\/almanac\/properties\/s\/shape-margin\/","url_meta":{"origin":14027,"position":1},"title":"shape-margin","date":"August 31, 2020","format":false,"excerpt":"The CSS shape-margin property adds margin to CSS shapes that are created with the shape-outside property. It acts sorta like shape-image-threshold in that it changes the distance between the CSS shape and the content around it, but instead of working with opacity values to include semi-transparent pixels in the floated\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/08\/shape-margin-illustration.svg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":14081,"url":"https:\/\/css-tricks.com\/almanac\/properties\/o\/overflow\/","url_meta":{"origin":14027,"position":2},"title":"overflow","date":"September 5, 2011","format":false,"excerpt":"The overflow property controls what happens to content that breaks outside of its bounds: imagine a div in which you've explicitly set to be 200px wide, but contains an image that is 300px wide. That image will stick out of the div and be visible by default. Whereas if you\u2026","rel":"","context":"In \"overflow\"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/02\/overflow-visible.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":14047,"url":"https:\/\/css-tricks.com\/almanac\/properties\/d\/direction\/","url_meta":{"origin":14027,"position":3},"title":"direction","date":"September 5, 2011","format":false,"excerpt":"The direction property in CSS sets the direction of of content flow within a block-level element. This applies to text, inline, and inline-block elements. It also sets the default alignment of text and the direction that table cells flow within a table row. .main-content { direction: rtl; \/* Right to\u2026","rel":"","context":"With 14 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":203844,"url":"https:\/\/css-tricks.com\/almanac\/properties\/s\/shape-outside\/","url_meta":{"origin":14027,"position":4},"title":"shape-outside","date":"June 17, 2015","format":false,"excerpt":"The shape-outside property controls how content will wrap around a floated element\u2019s bounding-box. Typically this is so that text can reflow over a shape such as a circle, ellipse or a polygon: .element { float: left; shape-outside: circle(50%); width: 200px; height: 200px; } It\u2019s important to note that this property\u2026","rel":"","context":"In \"basic shapes\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14045,"url":"https:\/\/css-tricks.com\/almanac\/properties\/d\/display\/","url_meta":{"origin":14027,"position":5},"title":"display","date":"September 5, 2011","format":false,"excerpt":"Every element on a web page is a rectangular box. The display property in CSS determines just how that rectangular box behaves. span.icon { display: inline-block; \/* Characteristics of block, but lays out inline *\/ } The default value for all elements is inline. Most \"User-Agent Stylesheets\" (the default styles\u2026","rel":"","context":"In \"display\"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2011\/09\/inline-block.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14027"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/1036"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=14027"}],"version-history":[{"count":9,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14027\/revisions"}],"predecessor-version":[{"id":331626,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14027\/revisions\/331626"}],"up":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/13915"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=14027"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=14027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}