Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Omar Suriel
5,403 Pointswhy display: table in clear fix? and not display: block? i read other answers but i still dont understand
why display: table in clear fix? and not display: block? i read other answers but i still dont understand....
isnt all we need an element after the last child with a class of clear both? why cant the element be a display block element?
1 Answer
Steven Parker
243,656 PointsFor modern browsers, use: display: block.
When the clearfix first started to be used, browser compatibility was not as good as it is today. The table value was often used for the display property as a work-around for browser inconsistencies.
At this point, "display: block" is the recommended setting for a clearfix.