views:

51

answers:

1

I'm working on setting up a page and am having difficulty with getting it to look well across browsers (actually just IE, as it renders properly for mozilla and webkit). I'm wanting to rule out quirks mode before seriously considering old IE bugs fixed since IE6. The container page has a declared doctype, however the iframe code does not. Will the iframe content be rendered in quirks-mode (because it does not have a doctype) or standards mode (because the container has a doctype)? The source follows this scheme:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
<html>
...
<body>
...
<iframe ...>
    <html>
    <head>
    ...
    </head>
    <body>
    ....
    </body>
    </html>
</iframe>
...
</body>
</html>
A: 

Quirksmode: IE renders iframes as separate document nodes, doctype is not inherited, and quirks is the default.

Edit: somebody else's demonstration of your problem and proof of non-inheritance (with thanks to my bookmarks :P )

However, you've chosen "Almost" as your doctype which means iframes aren't allowed anyway. The only way you could get valid iframes is if the parent was in quirks which makes inheritance or not a moot point.

Recommended reading.

annakata