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!

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 CSS Basics (2014) Enhancing the Design With CSS Text Shadows

Why doesn't my text shadow work?

I wrote the code for adding a text shadow to my h1 element like this: h1 {
text-shadow: 0 1px 1px rgba (0, 0, 0, .8); }

I checked it with the syntax of Guil's and it looks the same. I tried running the code on Firefox and Chrome. A text-shadow didn't appear in either browser.

1 Answer

Ryan Field
Ryan Field
Courses Plus Student 21,241 Points

When using rgba color values in CSS, you must not have a space between the rgba and the parentheses. You should use this:

h1 {
  text-shadow: 0 1px 1px rgba(0, 0, 0, .8);