Forum Moderators: open

Message Too Old, No Replies

Object tag instead of Iframe

Trying to get rid of the use of iframe

         

gpig

1:19 pm on Sep 9, 2004 (gmt 0)

10+ Year Member



Hey all,

have a site that i used iframes on, would like to replace with the object tag.

Just a couple of questions, is there any way to target the object tag as you do an iframe, also why when i use an object instead of an iframe and bring in an html doc to i get a big ugly border around in it in IE 6 on pc when i have the border="0" set, works fine in everythong else!

encyclo

1:37 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The
object
tag is pretty much completely broken in IE, and there are no easy ways round your problem that I know of. None of the CSS rules work, and none of the proprietary MSHTML ones do either.

Sadly, unless there has been some more research recently that I don't know of (it's been a while since I looked at this problem), I can only suggest returning to iframes, or using a server-side solution such as SSI.

The two following messages to a W3C mailing list illustrate the problem to some extent (although they are specifically addressing inserting an image rather than an HTML document):

[lists.w3.org...]
[lists.w3.org...]

gpig

2:20 pm on Sep 9, 2004 (gmt 0)

10+ Year Member



man thats severly irritating, as using the iframe tags creates its own issues, are there anyways round this

tedster

7:22 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What iframe issues are you struggling with? Since object is broken in IE, maybe we can address iframe problems head-on.

stef25

7:57 pm on Sep 9, 2004 (gmt 0)

10+ Year Member



in my experience you can almost always replace iframe with a scrollable div, except for targetting

i realise iframe is frowned upon, but the fact you can target content to any iframe box on your page is a big plus

gpig

7:51 am on Sep 10, 2004 (gmt 0)

10+ Year Member



I need the frames to be targeted, which is why we are using iframes, interested in the scrolling div, though, would that be able to handle an external file?

stef25

9:26 am on Sep 10, 2004 (gmt 0)

10+ Year Member



external file is not possible with scrollable div and just html. whats in the external file?

gpig

9:43 am on Sep 10, 2004 (gmt 0)

10+ Year Member



an html file

isitreal

12:28 pm on Sep 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



in my experience you can almost always replace iframe with a scrollable div

Unfortunately, there is a major glitch in overflow:auto and IE 6, scroll breaks in some circumstances, which are not unusual [blank space in the scrolling area].

In my experience if you need iframe functionality then you should stick with iframes. If you can use scrolling divs that's good, but they don't replace iframes. Target problems are just one of several things they can't deal with.

DrDoc

2:41 pm on Sep 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



big ugly border around in it in IE 6 on pc when i have the border="0" set

That's because "everyone else" applies the border on the outside, in the parent document... IE applies the border on the inside, in the target element.

So, if you don't want the border, use

html, body {border: none;}
in the document you open...