Gerard Gerard - 1 month ago 15x
CSS Question

CSS3 calc() validation: Value Error : width Parse Error

I need to validate a CSS3 file where I'm using the following code:

width:calc(96.3% - 312px)

It returns this error:

Value Error : width Parse Error - 312px)

My last choice is to use a Javascript function on page load and window resize to get the width value when it's possible using CSS3 (only for IE8 or older).


This appears to be a bug in the validator. Your calc() syntax is valid. Don't worry about it.

Whenever you need to validate your CSS, remove just that declaration so it does not cause irrecoverable parse errors.