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
mrx3
8,742 PointsQuestion about my fallback background-color.
I'm wondering if I have the background orders correct when using a background fallback? My code is below.
body{
background-color :#0000FF;
background-color: hsla(219 ,69%, 51%, 1);
}
I want the hsla to display first, if the user's browser can't display the hsla, I want the hexadecimal value to display. In my mind I was thinking that the hsla would be first, and then the hexadecimal would be last. When I tried the hsla first, and the hexadecimal value last, the background switched to using the hexadecimal value over the hsla. I changed the properties to what you see above and the hsla properties are applied, is the order correct above?
2 Answers
Jeremy Germenis
29,854 PointsWhichever property is stated last will be the final result.
Note: sometimes placing uncommon properties after common ones can result in no property being used ( depends on the property )
mrx3
8,742 PointsI understand your note section Jeremy. I tested that out and my body background property went white. Thank you so much for the reply, much appreciated.