|
Posted by Spartanicus on 05/16/06 10:02
Chris Diver <NOSPAMchris.diverNOSPAM@gmail.MAPSONcom> wrote:
>> <object data="foo.html" type="text/html" width="400" height="400">
>> <p><a href="foo.html">Appropriately titled link for browsers that
>> don't support <code><OBJECT></code></a>.</p>
>> </object>
>
>On this very topic, in FF and Opera this looks fine, however
>I was shocked when I tried to view it in IE and it didn't look
>the same.
It's foolish to expect things to look identical between browsers. IE's
default rendering is perfectly acceptable behaviour.
>IE decided that it needed a greyed out vertical scrollbar
>and a 3D border so it looks like it goes into the
>page.
>
>Does anyone know a way around it? I tried using 'overflow' and
>'border-style' style attributes to no avail.
Using <object> to embed HTML opens a new viewport inside the main
viewport, this viewport is totally independent from the main viewport.
The embedded viewport cannot be styled by the viewport in which it is
embedded, if you want to style it you should do so by specifying the
styling for the embedded document itself.
Different browsers behave slightly differently, IE needs the styling on
the <html> element, Opera needs it on the <body> element.
A word of warning: the inset border is important for users to recognize
the embedded document as being in an independent viewport. The scrollbar
is absolutely essential.
The usual reason why people want to hide both is because they are
confusing embedding another fully independent HTML document with
including code fragments such as Server Side Inclusion. Embedding is
*not* some form of "client side inclusion", there is no such thing (for
good reasons).
Don't clown around with embedding if what you really need is code
fragment inclusion, use SSI or a server side scripting language to do
that.
--
Spartanicus
Navigation:
[Reply to this message]
|