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

CSS CSS Basics (2014) Basic Layout Clearing Floats

Can't get the "group:after" thing to work...

When I use the "group: after" code, my floats aren't displaying how they are supposed to...

/* Floated Columns ------------------ */

.resorts, .tips { width: 46.5% }

.tips { float: right; }

.resorts { float: left; }

/* Float Clearfix ------------------ */

.group:after { content: ""; display: table; clear: both; }

and...

<div class="primary-content t-border group">

I don't understand what I'm doing wrong...

1 Answer

Steven Parker
Steven Parker
231,269 Points

It looks like you added the "group" class to the div element that already has the class "primary-content".

But in the video, the "group" class is added to the div that has the class "secondary-content" instead.

thank you so much i was having the same issue.

Steven Parker
Steven Parker
231,269 Points

It's good to know the old hints keep on helping. :wink: