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 trialtate lantis
1,344 PointsSelect the image and set it to be a block element.
i need help
Ledjo Dyrmishi
1,668 Pointsin index folder?
10 Answers
David Danko
1,415 Pointsthanks mate :DD
Landon S
3,433 PointsWhat Dave said above me is a good template for the answer. The "img" that he writes is where you will fill in the respective images class name.
img{
display:block;
}
Since we are directed to name the image's class "profile-photo" we must use that class name as the selector for the display property.
.profile-photo{
display:block;
}
Tanya Luthera
473 Pointsdisplay:block
}
hope this helps,sweet pea! <3
Tanya Luthera
473 Pointsthat does not help sweet pea, hmph!
Leah Miller
489 PointsOnly this does not work as a correct answer on the code challenge
A. S.
1,300 PointsI had the same problem as others described. The code provided above is correct-- don't forget to paste it in the CSS file. I was mistakenly pasting it in the HTML file.
-Annalee
Megan Nelson
819 Pointsi did the same thing. thanks for pointing this out. (I didn't scroll up, and thought the CSS file disappeared).
thanks Annalee.
Dave McFarland
Treehouse TeacherIn CSS, you can create a selector to select the image tag like this:
img {
}
To make an element display as a block-level element use the display
property:
display: block;
MUZ140699 Wellington Mugombi
5,016 Pointsimg { display: block }
Shawn Piers
2,373 Points!!!!! I have spent at least an hour trying to figure out how to make this work in the HTML, including nesting it in a <div> element, adding <style> etc within the page. I guess because I have to access the challenges through a VPN the pages are many times not so responsive. I JUST FOUND OUT THERE IS A CSS PAGE AVAILABLE :'(
ac n bv
Courses Plus Student 1,813 Pointsyes, thank you for making me aware of that
Lee Ann VanWinckel
1,480 PointsThanks to Analee!
Michelle Pepe
Courses Plus Student 6,125 Points.profile-photo{ display:block; } the profile-photo class is the image class created in previous exercise where you had to declare Nick's image as class profile-photo.
Stone Preston
42,016 PointsStone Preston
42,016 Pointscan you post the code youve tried so far? you will have to format it using markdown. see this post for info on how to do that