Forum Moderators: open
I'm currently designing a site which will employ an iframe in a sort of menu function. The problem is that my design is image intensive and really requires some things to be of exact size. Here's the code i'm using for my iframe:
<TD WIDTH=281 HEIGHT=321 BGCOLOR=#FFFFFF><iframe src="http://www.sordeo.com/features.html" width="281px" height="321px">If you are seeing this message, then your browser does not support internal frames, for this site to display properly, it must.</iframe></TD>
The real problem is that Mozilla and netscape make the iframe to be about 283/284 pixels in width (instead of the set 281), which causes my page to turn out really poor and things to not fit together properly.
There may be some replies to the effect of, "well, stop using iframes then". I know they can be considered poor style sometimes but for this particular page and it's particular use, I don't see a way around it.
How do I change it so it displays at 281 pixels in width. There was a suggestion in another thread about using ilayers which then causes links in the iframe to no matter what open in a new window, and that i'd really like to avoid doing as well.
There were numerous threads about (poor) Netscape support for iframes.
Just click the link below for all messages on Webmasterworld that contain "netscape" and "iframe".
Search Webmasterworld: netscape+iframe [google.com]
Personally, I use a lot of frames and iframes and have had no problem with sizing them in Mozilla, opera, or any other iframe supporting browser.
If you want them to fit in the td, just set the iframe height and width at 100%, like width="100%", then it should just expand to fill its container, although you might have to declare an explicit CSS style for the container, like position:relative to make sure that the iframe knows what its container is, but try it the first way, don't size the iframe, size its container, then set the iframe to fill it with % values.