[thelist] I-frame and DTD woes

Tony Page zamba at zamba.com
Tue Feb 3 17:20:28 CST 2004


Brilliant! Just what I was looking for, lucid and to the point, didn't
just give me the fix but explained why - thank you. And it's a timely
reminder about the value of this list and the need to pay attention to
all coding disciplines and not just the ones you regularly use - you
never know when you're going to need them!

(BTW, I'm dropping a line to the company supplying the code in question
pointing out the problem with a credit)

Tony Page

-----Original Message-----
From: James Aylard [mailto:evolt at pixelwright.com] 
Sent: Wednesday, 4 February 2004 2:28 AM
To: zamba at zamba.com; thelist at lists.evolt.org
Subject: Re: [thelist] I-frame and DTD woes

Tony Page wrote:
> I have a frustrating problem with the use of an affiliate link that 
> uses an i-frame to show a display of bags within my page. The i-frame 
> will only display partially unless I remove the DTD from the file 
> (discovered by long trial and error). However, if I do this all my CSS

> navigation is screwed up. I don't usually use i-frames so I am at 
> something of a loss. Here is the URL: 
> http://www.travelsignposts.com/resources/buy-luggage-online.html

    The inline CSS for the iframe's dimensions do not include a unit of
measurement (UOM):


    Your doctype declaration is switching IE into compliance mode, which
means it will ignore dimensions without a UOM and therefore display the
iframe with default dimensions (300px wide by 150px tall, typically).
When you remove the doctype declaration, IE reverts into quirks mode
which allows dimensions without a UOM, and therefore displays the iframe
with the dimensions you intend. Change your style declaration
(preferably in an embedded or linked style sheet rather than inline) to
width:700px;height:1260px; and you'll be in business.

James Aylard

More information about the thelist mailing list