Important Notice: We're experiencing email notification issues. If you've posted a question in the community forums recently, please check your profile manually for responses while we're working to fix this.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Error in parsing value for width, Declaration dropped

  • 3 trả lời
  • 124 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi benthorn

more options

Warning: Error in parsing value for 'width'. Declaration dropped.

Line: 0

URL of affected sites

http://webstie.com

User Agent

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)

Warning: Error in parsing value for 'width'. Declaration dropped. Line: 0 == URL of affected sites == http://webstie.com == User Agent == 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)

Tất cả các câu trả lời (3)

more options

You can ignore (CSS) errors in the Tools > Error Console. Those errors are only useful if you develop websites and want to check the HTML/CSS and JavaScript code for errors. Most errors are code for other browsers like IE or browsers on other platforms or just typos or the result of bad coding.

What is the problem?

See Websites look wrong or appear differently than they should

more options

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.

more options

This is FF being pedantic about code...

If you're trying to set a CSS Style measurement property with Javascript, you need to specify the measurement unit (eg "px", "%", "em", etc as you do in CSS) as a string. Passing an integer (without the measurement unit) into the property value causes the error.

Example:

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.