Forum Moderators: open

Message Too Old, No Replies

W3Cs "validated icon" code breaks my validation

Styles not defined correctly

         

jbinbpt

7:50 pm on Aug 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I finished a small project today and validated the code with unicorn [validator.w3.org...] When I added their validation icons, I was no longer valid.

The html tag has the styles incomplete.
<p>
<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01 Transitional"
style="height: 31; width: 88;">
</a>
</p>

Height and Width should be:
style="height:31px; width:88px;"

Who can you trust ;) Lesson learned

rocknbil

8:12 pm on Aug 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



LOL . . . ahh, you did send them a note didn't you? :-)

mack

8:36 pm on Aug 15, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Ohhh that made my day. :)

Mack.

phranque

8:10 am on Aug 16, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



interesting - the w3c ("non-unified") markup validator's "valid" icon uses the height and width attributes of the img tag instead of the style attribute as used by the unified validator's icon.

where's pageoneresults?
=8)

kaled

8:31 am on Aug 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, it does prove that we all make mistakes!

On a side note, does anyone know why a height of 31 pixels for images is so common? I've always taken the view that it's a bit nuts and use images that are 32 pixels high myself (if I need something about that size).

Kaled.

rocknbil

3:56 pm on Aug 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not real helpful on the specifics of the 31, but if you have text or an object inside the image that is an odd number of pixels in height, it will never center vertically if the height is an even number of pixels. The inverse is also true.