0

The following is my CSS code:

table th{  font-family:arial; font-size:9pt;  color:#ffffff; background: -moz-linear-gradient(#b9cdde, #7c98ae);  border: 1px solid #ffffff; }

table th:last-child{  background: -moz-linear-gradient(#729cc3, #35699a); }

I get a validation error with CSS which says

Value Error : background Too many values or values are not recognized : -moz-linear-gradient(#b9cdde,#7c98ae) -moz-linear-gradient(#b9cdde,#7c98ae)

Does someone have any idea as to why this might be happening?

1
  • gradients are css3 properties Commented Jun 16, 2011 at 22:07

1 Answer 1

1

Vendor-specific selectors such as -moz-linear-gradient are not part of the official CSS2 specification, so when the validator finds then, it will throw an error. Personally, I don't mind if stuff like this doesn't validate - it's only a nice, cleanly written gradient.

Sign up to request clarification or add additional context in comments.

4 Comments

It seems rather strange that BIRT is that strict. I can't really look into it, but is there possibly a setting that turns off the strict-ness. As an alternative, you could use a repeated gradient image as the background. It's not ideal, but at least it would work.
Ya, I was considering that option as well. But there are a few other elements that are not being supported by the BIRT. One being this and the other being "last-child" property, both of which I am extensively using throughout. Turning off the strictness is an option that I would look into. Any other inputs would be appreciated.
BIRT has two ways to add CSS: "Import CSS" and "Use CSS". If you use HTML output only, then "Use CSS" with "Include CSS file at view time" option could be more powerful and it shouldn't be restricted to BIRT-supported properties.
@reg_frenzy: You could try using PrefixFree – it's a client-side script that adds the prefixes for you based on the browser. So in your CSS you would simply use background: linear-gradient(...) and let PrefixFree add the prefixes for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.