We can see that the third div indeed hasn’t appeared below the two divs, as is the normal flow of HTML. Rather it has aligned itself to the starting position of the page, almost as if the first two divs don’t exist. The reason this happens is that when you apply a float to an element in HTML, that element is removed from the normal flow of the page. This causes the rest of the elements appearing after it to bleed into its space. In order to overcome this issue, we need to clear the floats in order for the browser to render the remaining elements properly. Let us look at some of the methods for the same:

  • bla
  • bla
  • bla
  • bla

error: Content is protected !!