Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 :-)