×

Html & Html5

The World's best Software Development Study Portal

CSS Float



Float is that property by which we can give position to our image or any content to left and right. Although it have 4 values which are as follows:-



  • left
  • right
  • none
  • inherit


We can float the image to the right . Let's understand this by the following program:-




Output of the Program



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas odio, vitae scelerisque enim . Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue.

We can see our image is at the left side.




We can float the image to the left also . Let's understand this by the following program:-




Output of the Program



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas odio, vitae scelerisque enim . Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue.

We can see our image is at the left side.







CSS 3 training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute