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

General Discussion

Border Around A Photo

I dob;r see anything wrong with this on css

Dr.-Maggie-Wincher img {

border: 8px solid #4169E1; margin: 0 0 20px 0; }

7 Answers

Jacob Miller
Jacob Miller
12,466 Points

You need to remove the photo name and leave just img. If you want to target a specific photo you can add an id and target the id in your CSS.

I Can't Create A Border Or Box Anywhere On My Pages

Ok I Will Try Removing Name

The Border Came Up Now My Background Photo Is Gone...LOL

Ok One More Question, I Want To Put The Entire Page In A Box With A Border And A Shadow

Target the elements body or html, e.g.

body { border: 1px solid black; etc. }

Cheers, Carsten

Thanks Carsten :-)