Float CSS

Float

We can float HTML elements by giving them the following values;

  • none – The element does not float. It is default value for any element.
  • inherit – The element inherits the value of float from its parent element.
  • left – The element floats to the left.
  • right – The element floats to the right.

Try it

Clear and Float

We can clear HTML elements by giving them the following values;

  • none – Allows floating elements on both sides. This is default
  • left – Does not allow floating elements on the left side.
  • right– Does not allow floating elements on the right side.
  • both – Does not allow floating elements on the both sides.
  • inherit – The child element inherits the clear value from its parent element.

Try it

Navigation menu

Navigation menu designed by implementing the list.

Try it

Float none

Try it

Web Layout

Try it

Video Lecture