|
Posted by Spartanicus on 11/15/05 17:37
Hans Dietmar Jaeger <jagger@jaggger.de> wrote:
>Hello again, you helped me out with the OBJECT-tag, thanks. But I can't
>find anything about who the size of the OBJECT to be rendered is
>calculated:-|
>
>Ok, if the OBJECT is an image, it's it natural size (defined in the
>header of the OBJECT). But now the OBJECT is a HTML-page; and this page
>consist of javascript code to build the HTML-source!
>
>I embedded an OBJECT with type text/html that consisted of only one
>simple plain HTML code: <font color="#ff0000">hello world!</font> It ist
>displayed correctly. But I do not gave an width/height attribute to the
>OBJECT-tag:
><object border="1" type="text/html" data="object_text.html"></object>
>
>border attribute only to see the size of the rendered object. And that
>is much more than the natural size of the HTML code!
If you analyze the finer detail of the CSS spec, CSS capable and enabled
browsers should determine the size of embedded HTML, despite the fact
that it has no /intrinsic/ size. However no browser that I know of does
that. Without a specified width and height a browser may collapse width
and height of the viewport established by the object element to 0 (IE),
or default to a certain non zero value (Opera, Gecko).
Ergo when embedding HTML you should always specify a width and height
for the viewport established by the object element via the width and
height attributes on the object element. Since you can only specify a
size in pixels that way, you could elect to also specify a width and/or
height with CSS, in which case you have other units available.
--
Spartanicus
[Back to original message]
|