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.


Keith Corona
Keith Corona
9,553 Points

Border default color with non-text items


In the lesson we are told that the border color defaults to the color of the text, however, if the item we are wanting to put a border around is, say, a picture, then what would the border color default to?

2 Answers

Martin Murphy
Martin Murphy
19,321 Points

Someone correct me if I am wrong but the default colour on an image would default to black. Say if you applied a style such as:

img {
  border: 1px solid;

This would create a black border around the image.

Esteban Valdez
Esteban Valdez
Front End Web Development Techdegree Student 8,858 Points

I believe that the border color is inherited from the User Agent Style Sheet. This is the style imported from the browser. Which is most likely black.