Click to See Complete Forum and Search --> : Object tag styles


tomtomlo
01-25-2008, 07:25 AM
Hello again!

I'm using the Object ag to embed an external html page which I am using as a navigation sidebar. This is because my web hosting doesnt provide SSI :(

Anyway I was wondering how I can remove the border of the object element in IE. Firefox doesnt seem to display it, but I cant get rid of it at all it IE.

Secondly, how do I tell it never to display scroll bars?

and thirdly, how do I get it to resize to fit the content in the external webpage.

Finally, I'm using the target="_parent" attribute in the links on the external html page. Firefox deals with this fine but IE loads the link in the Object frame. How do I get around this? Its driving me nuts!

This is the style im using at the moment:

#obj_border { border: 0px;
scroll: no;
width:200px;
height:400px;
float:left;
}

but it doesnt seem to register anything except the width and height!

Thanks again!

Tom

WebJoel
01-25-2008, 08:26 AM
I doubt if you can make the "<object>" resize to fit the external page, you have to make the external page fit the "<object>".

As for scrollbar, there will always be a vertical scrollbar, -even if one is not needed. This is hard-coded into every brower's shell or chrome to be present, even if grayed-out. This is for Accessibility, to always alllow for scrolling if necessary.

thig95
04-03-2008, 09:49 AM
Hey tomtomlo, did you ever figure out a workaround for this? I'm having the EXACT same issue and no matter how many things i seem to dig through, no one has come up with a solid workaround.

I've done quite a bit of research into this. IE does a terrible job implementing the OBJECT element. The only reason i can figure that would cause target="_parent" OR target="_top" or window.top.location=href not to work is because the parent/child relationship between the two is broken or not understood by IE. As you said, it will just load the link within the object instead of the main window.

The scrollbars and padding is another problem. I've seen posts claiming to fix the issue on IE, but none have worked for me so far. CSS styling isn't going to do anything except change height and width like you pointed out. you can also control the elements visibility but IE will load the contents of the object even if the display is set to none (another problem i'm having).

Another terrible issue with the OBJECT implementation in IE is within the DOM structure. You cannot access the element.data attribute to dynamically load content into an object. All this can be done with an IFRAME element, but sadly IFRAME isn't supported in strict XHTML (which is what i am stuck coding in).

Any thoughts? If you've figured out a solution to any of the above, you're def ahead of me!

~Brian

WebJoel
04-03-2008, 10:04 PM
...Sheez, -I must have missed this!! :eek:

#obj_border { border: 0px;
scroll: no;
width:200px;
height:400px;
float:left;
} No such Selector:declaration

Selector is "overflow"

and the values are one of:

"visible", "hidden", "scroll" or "auto"

There is no "none" for this.