CSS CSS Basics (2014) Basic Selectors Reusing Classes

Shane Phan
Shane Phan
1,436 Points

No color specified in border in teacher's notes- what color used by default?

I was just curious what would happen if you did not specify a color value in the "border" property in CSS. I tried it in the .t-border property from my Workspace following along with this video- the border became darker gray. Where did CSS pull that gray color from? Is there a default color or does it pull from other information in your document?

1 Answer

It is taking it from the color property of the body just like your h2 tag is. It also doesn't have a specific color property. Play around with it by leaving out the color in your class secondary.content and changing the color in your body.

Shane Phan
Shane Phan
1,436 Points

Ahh I see now, yeah it took the color from the body. Thanks!