Aren't those (header, article) from XHTML? And for use for syndication ala XLM-ish use of the page? If I've got that right, I don't think earlier IE ever supported any of that, regardless of the DOCTYPE. What's been your experience?
Anyways, the issue here is something that the browser supports in other standards compliant DTD's that it doesn't support in HTML 5, even though it is technically valid in HTML 5 - right?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
they're regular elements is html5, replacing<div id="header">,<div class="article">and the like. Because they have xml parsers, most modern browsers will apply css to them now, without any trouble. IE ignores them (treats them as meaningless, nonsense tags) unless you use createElement to make an example of the new element (then IE magically recognizes all of them).
No, IE never (still doesn't) support xml. Ironically, the non-js solution for html5 elements involves xml namespaces and intentionally serving it to IE wrong.
So before HTML 5 they didn't work in IE without a fudge, now with HTML 5 they still require a fudge, right? If so, nothing odd there. Not HTML 5's fault.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
So what's right? Here's my test page - validates as HTML 5 and it's css validates too:
Here's the demo:HTML Code:<!DOCTYPE html> <html> <head> <title>IE - Iframe & <article> Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> iframe { overflow: hidden; border-width: 0; width: 300px; height: 250px; } article { font: bold 90% sans-serif; } </style> </head> <body> <iframe src="http://www.google.com/"></iframe><br> <article>Hola!</article> </body> </html>
http://home.comcast.net/~jscheuer1/s...iframe_art.htm
It's different here in Firefox, doing all of what I would want it to, but not necessarily according to standards. The iframe has no border or scrollbars even though its content overflows. The article tag's content is rendered according to the font set in the style section.
IE 8 and less render the iframe with a border and scrollbars and render the article content without the style. Safari (which balked at loading it at all at times, redirecting to some Asian site), Opera and Chrome showed no border but did show scrollbars. All three of those got the article tag 'right'. IE 9 was like them as well.
Last edited by jscheuer1; 01-28-2011 at 05:05 AM. Reason: English usage
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
that lack of styling on the article element is what I'm talking about. add this to your head and try again in IE
Code:<script>document.createElement('article');</script>
Yes, I caught that already. It should be noted though that without the <br>, article style needs to be setdisplay: block;for IE < 9. And should be anyway, just in case anything added later depends upon article's native display property, which is block in supporting browsers, inline in IE < 9 when using the fudge.
However, I was simply referring to a page without fudge, and how even the supposedly standards compliant browsers varied.
Does Firefox have it right, or those others?
In IE < 9 without fudge it sees:
as:Code:<article>Hola!</article>
The iframe is a little more difficult to crack. This 'works' in Firefox, Opera, IE 7+, but still fails to remove scrollbars in Safari and Chrome:Code:<ARTICLE></ARTICLE>Hola!<ARTICLE></ARTICLE>
I guess web kit browsers do not support the attribute scrolling in this context (they do assign it, it's in their DOM view, and if you hard code it they still ignore it), and see it as either cross domain to (essentially) set Google's HTML and/or BODY elements to overflow hidden, and/or they don't respect that property/value pair for iframe.Code:<!DOCTYPE html> <html> <head> <title>IE - Iframe & <article> Test II</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> iframe { overflow: hidden; border-width: 0; width: 300px; height: 250px; } article { font: bold 90% sans-serif; display: block; } </style> <script> (function(){ var a = document.createElement('article'); a = null; })(); </script> <script defer> (function(run){ var f1 = document.getElementsByTagName('iframe')[0]; if(!f1 && window.addEventListener && !run){ document.addEventListener('DOMContentLoaded', arguments.callee, false); return; } if(!f1){setTimeout(arguments.callee, 300); return;} f2 = f1.cloneNode(false); f1.src = 'about:blank'; f2.frameBorder = '0'; f2.scrolling = 'no'; f1.parentNode.replaceChild(f2, f1); })(); </script> </head> <body> <iframe src="http://www.google.com/"></iframe> <article>Hola!</article> </body> </html>
Demo II:
file://localhost/C:/webwork3/test/html_5_tests/ie_iframe_art_2.htm
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I think, in that example, Opera and Chrome got the iframe "right." And you're right that that is another issue --cross-browser consistency-- that will be some time in resolving. There are javascript "fix" scripts that add all the new elements, and set their display properties appropriately.
I don't see any way to get rid of the scrollbars for the iframe in web kit without setting the HTML (if the page in the iframe is standards compliant, the BODY if not) element of the page in the iframe to overflow hidden. This can only be cross scripted in javascript alone only if the pages are on the same domain (browser security restrictions, at that rate you can set it hard coded or (perhaps preferred, depending upon the reason) javascript scripted on the page in the iframe). With server side code it can be extended, but at that point the remote host might block it, and it requires the host of the top page to have certain permissions set. And it's complicated, subject to failure for other reasons in some cases.
Last edited by jscheuer1; 01-28-2011 at 04:33 PM. Reason: add qualifier to one parenthetical
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks