W3C home > Mailing lists > Public > www-validator@w3.org > October 2012

RE: The "" attribute on the iframe element is obsolete. Use CSS instead.

From: Michael Williams <mwilliams@westtexasretina.com>
Date: Thu, 18 Oct 2012 09:51:49 -0500
To: "'Jukka K. Korpela'" <jkorpela@cs.tut.fi>
Cc: <www-validator@w3.org>
Message-ID: <000c01cdad40$1a990300$4fcb0900$@westtexasretina.com>
Yeah, I have overflow:hidden; but I also found that HTML5 supports <iframe
src="" seamless><iframe> where seamless is supposed to create the same
effect as height=0 width=0 and scrolling=no. but I still had to add
scrolling no to the iframe tag and just say ok, w3 says its no bueno, but it
works.

Regards,

Michael C. Williams
IT Specialist
Ophthalmology Specialists of Texas 
Desk: 325-690-4485
Cell:   325-267-5468
mwilliams@westtexasretina.com

-----Original Message-----
From: Jukka K. Korpela [mailto:jkorpela@cs.tut.fi] 
Sent: Thursday, October 18, 2012 9:31 AM
To: Michael Williams
Cc: www-validator@w3.org
Subject: Re: The "" attribute on the iframe element is obsolete. Use CSS
instead.

2012-10-10 22:11, Michael Williams wrote:

 > I have my page www.westtexasretina.com/contact.html
> <http://www.westtexasretina.com/contact.html>, I get 7 errors in 
> regards to using iframe attributes rather than CSS

That's because the HTML draft declares those attributes as obsolete.

> I attempted to use CSS to
> control these attributes, however it did not get supported across all 
> browsers

Such things may well happen. "Use CSS instead" expresses just a general
idea, and it does not guarantee that you can actually replace the attribute
by the use of CSS and have things working on all browsers. 
Generally, an obsolete feature tends to work more reliably than the
recommended replacements.

In particular, on Chrome (and Safari), the scrollbars of an iframe cannot be
removed using the standard CSS setting overflow: visible. The implementation
is special, and you need to use a special nonstandard pseudoelement for the
purpose:

   iframe::-webkit-scrollbar {
     display: none;
   }

I learned this from
http://stackoverflow.com/questions/1691873/safari-chrome-webkit-cannot-hide-
iframe-vertical-scrollbar

> I think it could be beneficial if obsolete attributes were referenced 
> with the correct CSS attribute

That would go beyond the scope of HTML validation and would mean that the
validator would need to be modified to reflect the status of CSS and its
implementations. Moreover, it's often a matter of something more complicated
than just using a CSS property. (As a terminology issue, HTML has
attributes, CSS has properties.)

Yucca
Received on Thursday, 18 October 2012 14:52:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 October 2012 14:52:31 GMT