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

Eric Nachtsheim
Eric Nachtsheim
3,249 Points

Why is my preview color is off?

As told in the video, I end up with this in my a:focus

background-color: rgba(255, 165, 0, .5);

In the preview page, it shows up as a light shade of orange as expected. But when I hover my mouse over this value in the workspace, it shows a shade of brown. I don't understand why that is.

1 Answer

Steven Parker
Steven Parker
229,005 Points

For "focus" to take effect, you'd need to select the element, not just hover over it.

But the workspace editor doesn't use the CSS, that's what the preview page is for. In the workspace, you're probably seeing some aspect of the syntax highlighting features of the editor.

Eric Nachtsheim
Eric Nachtsheim
3,249 Points

So, because of the way focus works, the workspace won't always preview focus color correctly? I'm most confused because it did preview it correctly before I added the ".5" onto it.

I suppose I am still getting the color I want in the end.

Steven Parker
Steven Parker
229,005 Points

It might help if you make a snapshot of your workspace and post the link to it.