[thelist] I-frame and DTD woes

James Aylard evolt at pixelwright.com
Tue Feb 3 09:28:06 CST 2004


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):

style="width:700;height:1260;"

    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