Incorrect checking for HTML5 <IFRAME> WIDTH as percent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect checking for HTML5 <IFRAME> WIDTH as percent

Harvey Partridge
I am trying with minimal success to add an iframe map to my new HTML5 webpage http://www.pearblossomhouse.com/pearblossom/documents/drainlake.html

Whilst trying to establish why my iframes do not display I got this checking error ...

Validation Output: 1 Error

Error Line 66, Column 111: Bad value 95% for attribute width on element iframe: Expected a digit but saw % instead.
…me/N151.12061,6.11309,-3.06282,48.19144/Z8/" width="95%" height="200"></iframe>


This conflicts with the information on http://www.w3schools.com/html/html_iframe.asp where it says ...


Iframe - Set Height and Width

Use the height and width attributes to specify the size.
The attribute values are specified in pixels by default, but they can also be in percent (like "80%").


My knowledge may be incomplete as in - it is NOT permitted to do % from HTML5 - but it would be nice to know either way which is correct.


Meantime, I'm off to try to do it CSS ....



Thanks for your attention.


Harvey Partridge


Reply | Threaded
Open this post in threaded view
|

Re: Incorrect checking for HTML5 <IFRAME> WIDTH as percent

David Dorward-3

On 18 Sep 2014, at 18:52, Harvey Partridge wrote:

Bad value 95% for attribute width on element iframe: Expected a digit but saw % instead.
…me/N151.12061,6.11309,-3.06282,48.19144/Z8/" width="95%" height="200">

This conflicts with the information on http://www.w3schools.com/html/html_iframe.asp where it says ...

W3Schools (which is not affiliated wight he W3C) is wrong, or describing HTML 4, it is unclear.

See the spec:

The attributes, if specified, must have values that are valid non-negative integers.

--
David Dorward
http://dorward.co.uk/