4 Replies Latest reply: Aug 10, 2012 9:15 AM by osgood_ RSS

    Clear Float

    kcfi Community Member

      Do I need this on my page?

       

      <br class="clearfloat"><!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->

       

      Here's the page:

      http://draw.biz/index2.html

        • 1. Re: Clear Float
          osgood_ MVP

          Have you checked the page in all the modern browsers? If it displays how you require it to then you don't need it.

          • 2. Re: Clear Float
            kcfi Community Member

            It displays fine. I will delete it. Thanks.

            • 3. Re: Clear Float
              kcfi Community Member

              I see now on my other pages where I do have floats in the main div that it is necessary, so I'll just leave it on all my pages. I don't think it can hurt.

               

              Is there a way to insert it and not have it attached to a <br>? It's the <br> that's affecting my page, not the clearfloat.

              • 4. Re: Clear Float
                osgood_ MVP

                kcfi wrote:

                 

                I see now on my other pages where I do have floats in the main div that it is necessary, so I'll just leave it on all my pages. I don't think it can hurt.

                 

                Yes, if you have floated elements like <divs> on your pages then a clearing solution which directly follows those <divs> is usually needed.