{"id":6117,"date":"2015-08-10T12:15:29","date_gmt":"2015-08-10T09:15:29","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=6117"},"modified":"2018-01-08T14:14:09","modified_gmt":"2018-01-08T12:14:09","slug":"css-float-left-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/","title":{"rendered":"CSS Float Left Example"},"content":{"rendered":"<p>In this example, we&#8217;ll explain a very useful CSS positioning property, <code>float<\/code>. The float CSS property specifies that an element should be taken from the normal flow and placed along the left or right side of its container, where text and inline elements will wrap around it. It is supported on all modern browsers and can be used with having to add extra prefixes.<\/p>\n<p>Aside from the simple example of wrapping text around images, floats can be used to create entire web layouts. Float&#8217;s sister property is <code>clear<\/code>. An element that has the clear property set on it will not move up adjacent to the float like the float desires, but will move itself down past the float.<\/p>\n<p>&nbsp;<br \/>\n[ulp id=&#8217;nAkUl5IbAjqlXSla&#8217;]<\/p>\n<h2>1. Basics<\/h2>\n<h3>1.1 Document Setup<\/h2>\n<p>Go ahead and create a new html document and add the basic sytnax in it like so:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;CSS3 Float Left Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- STYLE SECTION --&gt;\r\n\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;!-- HTML SECTION --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h3>1.2 Syntax and Values<\/h3>\n<p>Just like all css properties, the syntax for float follows the format: <code>.class\/tag { property: value; }<\/code>, in this case: <code>float: value;<\/code>.<br \/>\nThe values this property can take are:<br \/>\n<code>float: left; <\/code>      &#8211; indicates that the element must float on the left side of its containing block.<br \/>\n<code>float: right;  <\/code>    &#8211; indicates that the element must float on the right side of its containing block.<br \/>\n<code>float: none; <\/code>      &#8211; indicates that the element must not float.<\/p>\n<p>\/* Global values *\/<br \/>\n<code>float: inherit;<\/code><br \/>\n<code>float: initial;<\/code><br \/>\n<code>float: unset;<\/code><\/p>\n<h3>1.3 Application<\/h3>\n<p>Let&#8217;s see the very first and basic application of the float property. First add some elements to the html like below:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div class=\"wrapper\"&gt;\r\n    &lt;h3&gt;Title goes here&lt;\/h3&gt;\r\n    &lt;p&gt;Bacon ipsum dolor amet tail corned beef beef, brisket biltong shoulder shankle chicken. Jerky shoulder ham tongue leberkas, spare ribs shankle andouille flank pancetta. Jerky meatloaf chuck, sausage turducken venison shank. Rump tenderloin bresaola pork chop. Tail pancetta picanha cow pastrami, boudin alcatra pig ribeye. Ball tip t-bone short loin ground round. Rump prosciutto bacon pork belly filet mignon.&lt;\/p&gt;\r\n    &lt;img src=\"image.png\"&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre class=\"brush:css\">\r\n&lt;!-- STYLE  SECTION --&gt;\r\n&lt;style type=\"text\/css\"&gt;\r\nbody {\r\n    font-family: \"Neris\";\r\n}\r\n.wrapper {\r\n    margin: 2em;\r\n}\r\nimg {\r\n    float: left;   \/* display image on the left side of the document *\/\r\n}\r\n&lt;\/style&gt;\r\n<\/pre>\n<p>Pretty straight forward, in the browser it would look like this:<br \/>\n<figure id=\"attachment_6126\" aria-describedby=\"caption-attachment-6126\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left1.jpg\" alt=\"CSS Float Left Property Basic Application\" width=\"820\" height=\"327\" class=\"size-full wp-image-6126\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left1-300x120.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6126\" class=\"wp-caption-text\">CSS Float Left Property Basic Application<\/figcaption><\/figure><br \/>\nWell, this might seem dissapointing for now, because as you can see, the image is right where it could normally be without using the float property. This is because the default state of a new element is top left, after the previous element, that is why you see that image right there. In a general viewpoint, float forces the element to align left\/right. To understand this better, follow along in the next section.<\/p>\n<h2>2. Getting to Know Float Better<\/h2>\n<h3>2.1 Understanding Positioning Cases<\/h3>\n<p>You just saw how we floated an image on the left side of our document, but that didn&#8217;t seem to be any different from the default state. Let&#8217;s see a more specific case where the image has some text before it in the code, which will normally move the image a little bit right, but that doesn&#8217;t happen because of float: left, and this is where it starts to become interesting. Change the HTML like so:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\nJust random text here!  &lt;img src=\"image.png\"&gt;\r\n\r\n<\/pre>\n<p>Without changing the CSS, look at the result we&#8217;d get:<br \/>\n<figure id=\"attachment_6129\" aria-describedby=\"caption-attachment-6129\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left2.jpg\" alt=\"Getting to Know Float\" width=\"820\" height=\"138\" class=\"size-full wp-image-6129\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left2-300x50.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6129\" class=\"wp-caption-text\">Getting to Know Float<\/figcaption><\/figure><br \/>\nNotice how even though the text was before the image in our HTML, they switched places because of the <code>float: left;<\/code> property applied to the img element. That forced the image to override any other element on the left by moving them to the right, and positioning itself most left than any other.<\/p>\n<p>But what if we wanted to align the image left\/right in the same space used by the paragraph, not below it? Well, you can do that by including the img element inside our paragraph element and that will enable the image to alight left\/right relating to the paragraph like this:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div class=\"wrapper\"&gt;\r\n    &lt;h3&gt;Title goes here&lt;\/h3&gt;\r\n    &lt;p&gt;&lt;img src=\"image.png\"&gt; Bacon ipsum dolor amet tail corned beef beef, brisket biltong shoulder shankle chicken. Jerky shoulder ham tongue leberkas, spare ribs shankle andouille flank pancetta. Jerky meatloaf chuck, sausage turducken venison shank. Rump tenderloin bresaola pork chop. Tail pancetta picanha cow pastrami, boudin alcatra pig ribeye. Ball tip t-bone short loin ground round. Rump prosciutto bacon pork belly filet mignon.&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>Now we&#8217;d have an image wrapped on the left, and it would look like this:<br \/>\n<figure id=\"attachment_6132\" aria-describedby=\"caption-attachment-6132\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left3.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left3.jpg\" alt=\"Left Floated Image Wrapped in a Paragraph\" width=\"820\" height=\"285\" class=\"size-full wp-image-6132\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left3-300x104.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6132\" class=\"wp-caption-text\">Left Floated Image Wrapped in a Paragraph<\/figcaption><\/figure><\/p>\n<h3>2.2 Multiple Element on Float<\/h3>\n<p>Now let us look at the case where the property is applied to multple inline elements. If two or more elements will have the property <code>float:left;<\/code> then the first one of them is going to be aligned in the most left hand of the page. Think of it just like the normal state of these elements. Look at the html below where we have created a new wrapper containing 3 boxes and a span element with text inside.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;div class=\"wrapper1\"&gt;\r\n    &lt;h3&gt;Title goes here&lt;\/h3&gt;\r\n    &lt;div class=\"box box1\"&gt;Float Left - Box 1&lt;\/div&gt;\r\n    &lt;span&gt;I'm not floated at all.&lt;\/span&gt;\r\n    &lt;div class=\"box box2\"&gt;Float Left - Box 2&lt;\/div&gt;\r\n    &lt;div class=\"box box3\"&gt;Float Left - Box 3&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>And in the styles, we&#8217;ve given them all <code>float: left;<\/code> property and some bg-colors to make them distinct.<\/p>\n<pre class=\"brush:css\">\r\n.box {\r\n    width: 200px;\r\n    height: 100px;\r\n    border: 1px solid #ccc;\r\n    margin-right: 1em;\r\n    text-align: center;\r\n    display: inline-block;\r\n    line-height: 6em;\r\n    float: left;\r\n}\r\n\r\n.box1 {\r\n    background-color: gray;\r\n    color: white;.\r\n}\r\n\r\n.box2 {\r\n    background-color: green;\r\n    color: white;.\r\n}\r\n\r\n.box3 {\r\n    background: purple;\r\n    color: white;\r\n}\r\n<\/pre>\n<p>Normally, the boxes would all align left, and that would seem to make no difference from the default state:<br \/>\n<figure id=\"attachment_6137\" aria-describedby=\"caption-attachment-6137\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left4.jpg\" alt=\"All boxes Floated Left\" width=\"820\" height=\"253\" class=\"size-full wp-image-6137\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left4-300x93.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6137\" class=\"wp-caption-text\">All boxes Floated Left<\/figcaption><\/figure><br \/>\nIn a similar manner, if we were to change the float property from applying it to all boxes to just two boxes, those two particular boxes would align left but in the order specified in the HTMl code, meaning if we floated the 2nd and 3rd box to the left only, they&#8217;d both float left but 2nd box would be positioned before 3rd box. Here it is:<\/p>\n<pre class=\"brush:css\">\r\n.box1 {\r\n    background-color: gray;\r\n    color: white;\r\n    \/*no float here*\/\r\n}\r\n\r\n.box2 {\r\n    background-color: green;\r\n    color: white;\r\n    float: left;\r\n}\r\n\r\n.box3 {\r\n    background: purple;\r\n    color: white;\r\n    float: left;\r\n}\r\n<\/pre>\n<p>As you&#8217;d imagine, we&#8217;d get this:<br \/>\n<figure id=\"attachment_6139\" aria-describedby=\"caption-attachment-6139\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left5.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left5.jpg\" alt=\"Multiple Elements on Float Left\" width=\"820\" height=\"253\" class=\"size-full wp-image-6139\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left5.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/float-left5-300x93.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6139\" class=\"wp-caption-text\">Multiple Elements on Float Left<\/figcaption><\/figure><\/p>\n<h2>3. Conclusion<\/h2>\n<p>To conclude, the <code>float<\/code> property is a very useful CSS tool that allows better element alignment and overall positioning. Genereally speaking, float: left is going to seem just like the normal default state most of the times, but do remember that when things get messy around the page and you don&#8217;t get elements positioned like you want, float: left is going to be of much help because of its force state positioning.<\/p>\n<h2>4. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/07\/CSS-Float-Left.zip\"><strong>CSS Float Left<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we&#8217;ll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the normal flow and placed along the left or right side of its container, where text and inline elements will wrap around it. It is supported on all modern browsers and &hellip;<\/p>\n","protected":false},"author":75,"featured_media":917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-6117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CSS Float Left Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example, we&#039;ll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS Float Left Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example, we&#039;ll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-10T09:15:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-08T12:14:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"CSS Float Left Example\",\"datePublished\":\"2015-08-10T09:15:29+00:00\",\"dateModified\":\"2018-01-08T12:14:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\"},\"wordCount\":879,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\",\"name\":\"CSS Float Left Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"datePublished\":\"2015-08-10T09:15:29+00:00\",\"dateModified\":\"2018-01-08T12:14:09+00:00\",\"description\":\"In this example, we'll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/css\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CSS Float Left Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSS Float Left Example - Web Code Geeks - 2026","description":"In this example, we'll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/","og_locale":"en_US","og_type":"article","og_title":"CSS Float Left Example - Web Code Geeks - 2026","og_description":"In this example, we'll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the","og_url":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-08-10T09:15:29+00:00","article_modified_time":"2018-01-08T12:14:09+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"CSS Float Left Example","datePublished":"2015-08-10T09:15:29+00:00","dateModified":"2018-01-08T12:14:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/"},"wordCount":879,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/","url":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/","name":"CSS Float Left Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","datePublished":"2015-08-10T09:15:29+00:00","dateModified":"2018-01-08T12:14:09+00:00","description":"In this example, we'll explain a very useful CSS positioning property, float. The float CSS property specifies that an element should be taken from the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/css\/css-float-left-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/www.webcodegeeks.com\/category\/css\/"},{"@type":"ListItem","position":3,"name":"CSS Float Left Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=6117"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6117\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/917"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=6117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=6117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=6117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}