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 trialMasae Okada
5,742 PointsWhy do I have to use the property of "border-color" ?
I don't know the reason for putting border-color property here.
header { background: #6ab47b; border-color: #599a6b; }
because it works without it. This nav rule below changes the background color..
nav { background:#599a6b; }
So, I don't see the point to use border-color property here.
Sorry for my poor english and thanks for helping me in advance.
3 Answers
Emma Willmann
Treehouse Project ReviewerThese two property change the color of two different things; the background changes the color of the background while the border-color changes the color of the border. However, if you don't have a border-width set, you won't see a change in the border color. So, something like this:
header {
background: #6ab47b;
border-color: #599a6b;
border-width: 2px;
}
Seth Duncan
11,844 PointsHey Masae!
Is this question directly related to a quiz question or are you working on an HTML document yourself? Can you give me more context? My first thought would be the nav background is more broad than the header border. You may select more than you bargain for when using the nav background. I'm not sure if that helps?
EDIT: Emma said it better! They are two different things. The same result may be occurring visibly, but it is probably coincidence. Be sure to specify a border-width.
Masae Okada
5,742 PointsThanks Emma and Seth ;) I got it!!!