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 Foundations The Box Model Floats

Problems restoring the floats

Hi,

I've been trying to do exactly what's been done in a video (using chrome) and I didn't get the same result. Anyone could explian me if I'm doing any mistake?

Here's the result I get (http://scr.hu/17re/k34ii)

My code look's like this (http://scr.hu/17re/3omov).

I thought it was exactly as in tutorial.

8 Answers

One problem is that the width in your p rule doesn't have any units. 500

Can you also post your page markup?

Sure, here it is http://scr.hu/17re/zz0ef

Are you sure that is the right page? You don't have any of the content that is being displayed in the first example you posted.

Sorry i got it wrong, but I've edited the link, so now it is correct.

Take a look at the zip files for the lesson you were on. It looks like in your code you are adding a break after the paragraph to try and clear the float and the lesson suggest a clearfix on the before and after pseudo elements applied to the class of the main div.

It looks like that is what is causing your issues.

No, I don't think this is the problem. In the video, everything looks ok even at the moment when br is used. So the correct effect is there before pseudo elements exchange a break.

There we go :-) It's incredible that you may be looking at the same code for like half an hour and not to realize something that obvious ;-) Thanks a lot Jason!