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 trialMax Kutner
7,595 PointsHow do I select my image (under section) and set to be a block level element?
Hi! I'm currently in the challenge portion for today and this task was assigned. I don't believe we went over how to do this in HTML and if we did, I'm currently at a complete loss as to how to proceed. Please help me!
Best, Max
2 Answers
Kelly von Borstel
28,880 PointsIn css document you add display: block to img selector, like this:
img {
max-width: 100%;
display: block;
}
Rich Bagley
25,869 PointsHI Max,
Kelly is correct with the answer above. If you want to target specifically image tags within a section parent tag and set it to display block it would look something like this:
section img {
display: block;
}
Hope that helps
-Rich