Ahmad Fouad
Ahmad Fouad

Reputation: 4107

How to Fix This CSS3 Validation Error

I have this in my CSS file:

#text p {text-shadow: 0px 1px 0pt rgba(0, 0, 0, 0.50) }

But when I check it against CSS3 I get this error:

Value Error : text-shadow Too many values or values are not recognized : 0 1px 0 rgba(0,0,0,0.5 )

How to fix it please without altering the effect?

Thanks in advance.

Upvotes: 0

Views: 4459

Answers (3)

mkk
mkk

Reputation: 7693

According to quirksmode, text-shadow takes 4 parameters. Maybe try to move rgba to the first place? also please note that in 0px 1px there are px but for the third one you use pt.

Anyway i have created jsfiddle demo and it seems that it works, not sure why it does not validate...

Upvotes: 0

Meryovi
Meryovi

Reputation: 6231

The problem seems to be the W3C validator not recognizing rgba (if you just use rgb(0, 0, 0) it validates properly). I wouldn't worry.

On a side note, why did you use "pt" on the third parameter? You could just leave it as 0:

#text p { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.50) }

Upvotes: 2

Stecenko Ruslan
Stecenko Ruslan

Reputation: 293

yes, try

#text p {text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5) }

Upvotes: 0

Related Questions