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 How to Make a Website CSS: Cascading Style Sheets What is CSS?

background-color not working in Chrome

I changed to background : orange and this fixed the issue, Is this an issue with chrome?

2 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

background-color works in Chrome. In fact I believe that background-color will even override the color value if set in the background declaration.

was this the background of the page, a div, another element? It would help to see code or a link to the page with the issue.

James Barnett
James Barnett
39,199 Points

> In fact I believe that background-color will even override the color value if set in the background declaration.

That's not actually correct. The overriding is based on source order and selector specificity.

Andrew McCormick
Andrew McCormick
17,730 Points

well it is correct that I believed that.. my belief was just wrong. lol. Should have double checked before I opened my mouth. Thanks James.

James Barnett
James Barnett
39,199 Points

Andrew McCormick -

> well it is correct that I believed that.. my belief was just wrong.

That made me literally laugh out loud :laughing:

It seems to be working okay now, Thanks for the quick reply