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

HTML How to Make a Website Adding Pages to a Website Style New Pages

Amer Dababneh
Amer Dababneh
2,592 Points

FireFox issue

On the image appears in the far right. But I find a fix add rule clear:both; to profile-photo class.

4 Answers

Amer Dababneh, I can't really know the issue you are talking about, but

clear:both; 

used when you have floats for you children elements, but instead you can use the

.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1}

Then you can add the class clearfix to your parent element.

For example:

<div class="parent clearfix">
   <img class="left" src="image.png" />
   <img class="right" src="image2.png" />
</div>
.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1}

.left{float: left;}
.right{float: right;}
Amer Dababneh
Amer Dababneh
2,592 Points

Hi,

Thanks foryour answer.

I downloaded the code and run it in FireFox (31) and thats what I see(check the image) https://dl.dropboxusercontent.com/u/71992264/screen.jpg

there is an issue when using display: block; and if you add clear:both; for the image. the issue will be resolved.

Thanks again.

Dear Amer Dababneh , can you please share your code with me on ?

You can use this

OR