CSS Float

The float CSS property specifies that an element should be placed along the left or right side of its container, allowing text and inline elements to wrap around it.

  • left - The element must float on the left side of its containing block.
  • right - The element must float on the right side of its containing block.
  • none - The element must float on the right side of its containing block.
  • inherit - The element inherits the float value of its parent
Value Description
none The element does not float, (will be displayed just where it occurs in the text). This is default
left The element floats to the left of its container
right The element floats the right of its container
inherit Inherits this property from its parent element.

See this example:

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Example of CSS Float</title>
    body {  
	img {  
	  <p>nexladder.com is a learning online platform that helps anyone can learn Web Technologies. nexladder provides all web tutorials like Php, Mysqli, Vuejs, Html, Jquery etc in simple and easy steps starting from basic to advanced concepts with examples. <img src="https://nexladder.com/images/nex_logo.png" alt="nexladder" /> nexladder helps students, developers and project manager where they can learn topics in easy and simple language with examples. To make our website better for you, we bring updates to the website regularly.Our mission - To help you learn the skills you need to achieve your goal.</p>