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 trialJohn Luongo
5,735 PointsIād like to float the picture to the right instead of the left, but it keeps gets pushed to the bottom. What to do?
Here's my code: html
<section>
<p>WORDS WORDS WORDS
</p>
<img src="img/profile.jpg" id="profile-photo">
</section>
css
.profile-photo {
float: right;
margin: 15px 2px 0 5px;
display: inline;
}
2 Answers
Justin Burk
3,115 PointsWould taking out the display: inline; fix this issue?
Mark Wade
13,112 PointsYour img tag is below the p, which is full width, so it floats to the right below it. You can either move the img tag above the p, or make the p float left.