Forum Moderators: open

Message Too Old, No Replies

IE 5.1 on MAC and iframes

trouble with iframes and cross browser

         

mantis

8:31 pm on Jul 20, 2003 (gmt 0)

10+ Year Member



Hi all,
Doing a site right now using iframes and ave a bit of an issue, the page is looking fine under anything on a PC (IE, mozilla), but when I view the page on a MAC (IE5.1) my frame heights are all wrong. I have the iframe set up within a table cell.

<td rowspan="2" class="insframe" height="100%"> <iframe src="accomp.htm" width="270px" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>

CSS declarations for class
.insframe{
background-color: #404040;
border: 5px solid #F2F2F2 ;
text-align: center;
padding: 0;
vertical-align: top;
}

The src document called by the iframe is in a 1x1 table with a height and width of 100%. nothing special going on in there. So when it loads, the iframe is actually exceeding the cell that its being placed in by more than 5px. However, if i actually try to "size out" the call on a mac and give a pixel height, then on the pc it is too short.

anythoughts?
cs

korkus2000

12:52 pm on Jul 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you found any new information on this? I have to admit I really don't use iframes.

AWildman

1:12 pm on Jul 29, 2003 (gmt 0)

10+ Year Member



I had a lot of cross browser/platfrom troubles when trying to get an iframe within a table cell to adjust height up and down accordingly. I wound up doing the following:

<td valign = "top"><iframe name="changeme" src = "blah.html" width = "525" height = "1" align="right" scrolling="yes" frameborder="0></iframe>
</td>

When the iframe content loads, it'll automatically be the exact height of the cell.
I found from a usability point of view, that making the iframe scroll was bad in my case. The outer doc is the menu and the iframe contains all the changing content. Therefore, if the menu page is longer than the screen AND the changing content is longer than its given area, you wind up with two scrollbars. It ain't pretty. Just something to consider. Sticky me if you'd like to see an example (of how to do it, not the bad way! :))