Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Fabrice Triboix
Fabrice Triboix
6,858 Points

"display: block" makes the image move to top right corner...

Hi,

I am in the 'Style New Pages' video. I followed the instructions, but the image appears in the top right corner when using display: block. When using display: inline, it appears inside the section element as it should...

I checked that behaviour on Firefox (version 29.0) and my Google Nexus 7 tablet. In both cases, the photo appears on the top right corner. I downloaded the project files and opened the about.html file, and again Firefox displays the photo in the top right corner...

It looks like there is something else that has been done that does not appear in the video... What is it?

6 Answers

Catalin Sucigan
Catalin Sucigan
15,563 Points

Maybe this will help. Teacher's Notes CSS Properties

border-radius - Defines the roundness of a border corner. Accepts any CSS length unit. Correction for Firefox

There's a bug in the CSS for this video that causes the profile picture to display incorrectly in Firefox. In order to correct the issue, the clear property with the value both needs to be applied to the .profile-photo class. Here's what the corrected code looks like:

.profile-photo { clear: both; display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }

I think we are currently learning to display: inline-block I might be wrong though

Fabrice Triboix
Fabrice Triboix
6,858 Points

In the video and the project files, it's definitely display: block. I tried display: inline-block, but the result is visually the same as display: inline...

I am a few lessons behind but will catch up to you tonight. I will see if i get the same result.

In maybe 7 hours.

Fabrice Triboix
Fabrice Triboix
6,858 Points

Thanks Catalin. I didn't see there were notes. This fixed the problem, thanks!