Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 656687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:44:29+00:00 2026-05-13T22:44:29+00:00

Its the standard float issue. You have a bunch of floating elements inside a

  • 0

Its the standard float issue. You have a bunch of floating elements inside a parent container div. Since the childs are floating, the parent doesnt expand to include all of them.

I know about the clearfix solution as well as setting the overflow property on the parent container div to “auto” or “hidden”.http://www.quirksmode.org/css/clearing.html
To me setting the overflow method seems much nicer as its just one property. What I want to understand is when does the clearfix approach has advantage over this method cause I see it being used extremely often.

P.S. I am not concerned about IE6.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:44:29+00:00Added an answer on May 13, 2026 at 10:44 pm

    The only time you should bother using the “clearfix” method that inserts invisible content to clear is if you need an element to be visible when it overflows the element you’re applying it to, otherwise triggering hasLayout + overflow is golden.

    Note that in IE7 overflow hidden triggers hasLayout. Not sure about IE8.

    #wrapper { width:80em; overflow:hidden; }
    

    The method above will work fine in most all cases unless you need say, #header to overflow past #wrapper..

    #wrapper { width:80em; position:relative; }
    #wrapper:after {  content:"."; clear:both; display:block; height:0; visibility:hidden; }
    #header { position:absolute; top:-15px; left:-15px; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with most of its functionality implemented using standard TAction. I
According to the CSS 2.1 standard, the vertical margins of floating elements should not
In all major browsers : as the question states, a parent <div> container (whose
How do I detect from within a shell script if its standard output is
I'm writing a multithreaded Java program where each thread potentially needs its standard output
I have a file format (.STL, stereo lithography, the structure is standard and can
<div style=width: 800px; height: 600px> <div style=float:left; width: 100px> left fixed-width column </div> <div
I am trying to make the div at the bottom float to the right
I have a div element and I want that when I go over it
I have this code to find the mean and standard deviation of some input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.