This thread was archived. Please ask a new question if you need help.
Error in parsing value for width, Declaration dropped
Warning: Error in parsing value for 'width'. Declaration dropped.
URL of affected sites
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
All Replies (3)
What is the problem?
Ignoring the error doesn't solve the problem. I'm getting the same error also, on code that VALIDATES per the w3c CSS validator.
Firefox is wrong, it's seeing an error when there is none.
This is FF being pedantic about code...
var w = 10; //Assign an integer to variable w /* Now let's try passing w to set the CSS Width property of element */ element.style.width = w; // This Generates an error in FF, // but works fine in IE (IE doesn't generate // an error because it just assumes you mean "pixels" // when you pass an integer in the script.) element.style.width = w+"px"; // This works in both FF and IE. Will set the width to 10 pixels.