0

I designed a website for a company and everything works great. I decided that i might as well validate the whole thing so Ive been crushing errors. However, I came across this problem that I can't seem to figure out.
here is the error

Line 86, Column 106: Bad value 105px for attribute height on element img: Expected a digit but saw p instead.

Line 86, Column 106: Bad value 216px for attribute width on element img: Expected a digit but saw p instead.


Here is the line

<p class="centeredImage"><img src="images/logo.png" height="105px" width="216px" alt="ATS Logo"><img src="images/header1.png" alt="ATS Header"></p>


I am using the p class of centeredImage to obviously center the two images in the div. I thought removing the two 'p' tags would fix it but it still gives me the same error. It seems to be a problem with the actual height and width attributes.

Can someone tell me what is going on here and how to fix it?

4

4 に答える 4

6

The width and height attributes have nothing to with CSS. They just expect a number.

Link: http://www.w3.org/wiki/HTML/Elements/img

于 2013-04-01T15:16:55.613 に答える
1

高さと幅の属性には、「px」が存在する必要はありませんhttp://www.w3schools.com/tags/att_td_height.asp

于 2013-04-01T15:18:09.430 に答える