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

CSS

Adriana Karlak
Adriana Karlak
1,450 Points

Why was the property he used to change the color of the button called "background" instead of "background-color"?

The timestamp in the video is 1:30.

Are buttons not supposed to have a "background-color" property? Why did he just use "background" as the property?

2 Answers

Reggie Williams
STAFF
Reggie Williams
Treehouse Teacher

Adriana Karlak background-color only refers to the color but background is shorthand for all the properties of the background including the color.

Adriana Karlak
Adriana Karlak
1,450 Points

I see. Since he was only styling the background color, it would've been acceptable if he had used 'background-color' as well, correct?

Adriana Karlak
Adriana Karlak
1,450 Points

Thank you for the clarification! :)