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

Display property of image

Following along with the video, when styling Nick's image (profile-photo class) with display: bock; doesn't yield anything. When changed to "inline", the desired output is there.

Any idea as to what I could be doing wrong or what could possibly be causing this?

Thank you!

3 Answers

I think you mean display:block and if I remember correctly he uses a float on that one.

Double check and see if he did a float.

Don Shipley
Don Shipley
19,488 Points

Can you post you code? display: inline-block; is what I think you could be looking for.

Don Shipley
Don Shipley
19,488 Points

.profile-photo { display:block; }

That is exactly what I am using Don. Image does not display.

Once I change it from .profile-photo { display:block; }

to .profile-photo { display:inline; }

I can see the image on the page.

Wierd?!

Don Shipley
Don Shipley
19,488 Points

can you post your code inside your html in the section tag should read <img class="profile-photo" src="img/gratt.png" alt="Grant Photo">

In your css should read .profile-photo { display:block; }

I just checked the preview button and both show the image for me. The challenge is asking for the display:block inside of your css file.