Re: css validator errror

2014-09-19 12:51, Hut RG, Roland wrote:

> when i tried to validate my webpage i got these errors:
> Sorry! We found the following errors (2)
> URI : http://bioinf.nl/~rghut/index.html<http://bioinf.nl/%7Erghut/index.html>
> 26
>          Value Error : height<http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-height> only 0 can be a length. You must put a unit after your number : 31
> 26
>          Value Error : width<http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-width> only 0 can be a length. You must put a unit after your number : 88
>
> wich i couldnt find on my css stylesheet

The error messages refer to line 26. When you have submitted an HTML 
document for validation and the HTML document contains embedded style 
sheets in style="..." attributes, the numbers refer to line numbers in 
HTML source. And the line is:

<img src="http://www.w3.org/Icons/valid-xhtml10" alt=" Valid XHTML 1.0 
Strict" style="height:31; width:88" />

That's invalid CSS and will be ignored by conforming browsers. It does 
not matter much in practice, since the dimensions are the natural 
dimensions of the image. You can remove the style="..." attribute 
entirely, or append px to the numeric values, or use the html attributes 
height="31" width="88" instead of the style="..." attribute.

Or, best of all, remove the image and the associated link. They add no 
value to your page, and they often give false information (like right 
now on your page). If not convinced, check this:
http://www.cs.tut.fi/~jkorpela/html/validation.html#icon

> on the bottom of the page it said that all my coding was valid.

I can't see what you mean by that. Did you think that putting "Valid 
HTML!! or "Valid CSS!!" would somehow *make* the HTML or CSS code valid?

Yucca

Received on Friday, 19 September 2014 11:07:49 UTC