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

Stephan Whyte
Stephan Whyte
1,641 Points

display: block

When I add this css, the image is displaying inline with the header section and not in the area below.

html: </header> <div id= "wrapper"> <section> <h3>About</h3> <img src="img/nick.jpg" alt="photo"class="profile-photo">
<p> Hi, this is about me. This is where I share all of my my work. I also do other stuff aswell. </p> <p> If you'd like to follow me on twitter is <a href="http://www.twitter.com/staffwhyte"> @staffwhyte</a> </p> </section> <footer> etc...

css: /***************************** PAGE ABOUT *****************************/ .profile-photo{ display: block; max-width:150px; margin: 0 auto 30px; border-radius:100%; }

If I change the order of the html and put the img after the h3 it works fine, but not when it comes before it like in the tutorial.

2 Answers

Hi Stephan,

Are you on firefox?

The Teacher's Notes has a fix for this specific problem where you clear the floated header in .profile-photo

You can clear the floated header in your #wrapper div instead which can fix some more general problems in addition to this particular problem.

#wrapper {
  clear: both; /* Add this to your existing styles */
}