Forum Moderators: open

Message Too Old, No Replies

Scroll bar becomes hidden on MAC

Explanation and example code

         

trem

3:36 am on Sep 16, 2004 (gmt 0)

10+ Year Member



Hi,
I have a problem with scrollbars on iframes when using Mozilla 1.7.2 on a Mac.
This problem doesn't occur on windows in either IE6 or Mozilla.

I have 2 iframes both with scrollable content with partial overlap of the vertical scroll bar.
Each iframe has different z-index value (the upper most iframe is hidden and the other visible).

Even though the upper iframe is hidden I can still see the scroll bar. I figured a way to get around this would be to make the overflow:hidden for that iframe style.
What happens is, that although the scroll bar of the upper iframe becomes hidden after making the overflow:hidden, it now leaves a blank space over the lower iframes' scroll bar where there was an overlap.
Clicking the lower scroll bar makes it all become visible, but once the mouse is moved off the scroll bar, the whitespace of the hidden scollbar covers it again.

Here is the sample code:
<iframe id="buttonbase" name="buttonbase" style="width:600px;height:135px;top:170px;left:0px;position:absolute;z-index:2;visibility:visible;" src="http://www.google.com" scrolling="yes" frameBorder="0" marginHeight="0" border="0px" align="middle"></iframe>
<iframe id="info" name="info" style="overflow:hidden;width:560px;height:80px;top:175px;left:40px;position:absolute;z-index:3;visibility:hidden;" src="http://www.google.com" scrolling="yes" frameBorder="0" marginHeight="0" border="0px" align="middle"></iframe>

Does anyone know of a solution to this problem (keeping the iframe z-values as they are)?

Cheers.

tedster

9:50 am on Sep 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, trem.

Although I haven't addressed this particular situation, I do know that both IE for Mac and Safari present idiosyncratic quirks. In most cases, I have had to take a different tack in design to get the functionality I wanted - and it has usually been less than elegant.

Since frames and iframes present unique challenges for internal browser coding, getting this to work as it stands may be a losing battle.

First thing I'd check - you didn't mention if the mark-up has validated. Use [validator.w3.org...] to be sure.

If the page mark-up is valid and you still see the issues, then it's probably time to re-think your approach. But if it's not valid, the page may just be rendering properly on PC browsers because of their error recovery routines. Then fixing the validation issues may solve your rendering problems.

misha

4:22 pm on Sep 16, 2004 (gmt 0)

10+ Year Member



Try turning scrolling to auto instead of yes.

trem

10:06 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



Thanks for the suggestions. I double checked the validity of the syntax, but the problem remained with the scroll bars.