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 trialBorislav Gerov
3,625 PointsClear fix is not working
Can you help me solve the problem please? Im doing everything fine but the header is still not covering up the nav bar :/ My code: .clearfix::after{ content: ""; display:table; clear:both; }
4 Answers
Adam Vala
9,300 PointsI had the same problem. I had a space after the two colons in .clearfix::after.
And in the case of OP, I think he didn't add clearfix class in HTML.
James Akpan
4,529 PointsAnd yes please do check out the teachers note always. They could be sometimes more beneficial than the video. I said "Sometimes". XXOXOX
Ethan Zoller
7,592 PointsMake sure you are adding the class clearfix inside your html.
Brittney Laffey
14,740 PointsYour code shows 2 colons after ".clearfix". Try deleting one.
Steven Parker
231,275 PointsTwo colons is the correct syntax for a pseudo-element, though most browsers will let you get away with just one.
Steven Parker
231,275 PointsSteven Parker
231,275 PointsThat's not enough of the code to demonstrate the issue. To facilitate a complete analysis, make a snapshot of your workspace and post the link to it here.