Forum Moderators: open
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!
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...]
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.
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...