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 How to Make a Website Adding Pages to a Website Style New Pages

James Head
James Head
18,872 Points

Why does firefox need clear:both;?

I understand that firefox needs the clear:both; to display the photo.

Please can someone explain why? I thought clear:both reset the float command and as far as I can tell this part of the code doesn't have a float command.

Thank you.

Bob Sutherton
Bob Sutherton
20,160 Points

The video your post is associated with does not have any mention of this. If you can direct me to the video your question derives from I would like to see it.

James Head
James Head
18,872 Points

It is mentioned as a fix in the teachers notes. Thanks.

Bob Sutherton
Bob Sutherton
20,160 Points

Oh sorry, I didn't notice that. What does the image do in Firefox without the clear property? What bug is the clear property fixing here?

James Head
James Head
18,872 Points

in firefox, without the clear attribute the image doesn't show.

1 Answer

Bob Sutherton
Bob Sutherton
20,160 Points

Well, I thought I would take a crack at it but I didn't get very far. It says that there is "a problem in the CSS" that is causing it. There is no mention about what that problem is, although several people besides you seem to be asking about it. Maybe someone will be able to shed some light on it.

You are right about the clear property. It does keep floats from happening around an element.