4

I have an IFrame on my page that I would like to show the vertical scroll bar ONLY (no horizontal scroll bar). I can get it to work exactly how I want it in Firefox, but the scroll bars just will not show up in IE(8).

<iframe name="Frame" id="Frame" frameborder="0" scrolling="yes" marginwidth="0px" marginheight="0px" style="height:300px; width:1055px; overflow-x:hidden; margin-left:-30px"></iframe>

I tried putting the above into a div, and I finally get scrollbars, but since the IFrame itself isn't growing, they are never activated.

Are there any IE specific properties that I can use to get this to work on both browsers, or am I going at this the wrong way?

Thanks, Jeff

JGow
  • 55
  • 1
  • 7

3 Answers3

1

You're using overflow-x property in your style attribute, so it's removing the scroll bar (AFAIK).

Try setting overflow-x to scroll

JamesHalsall
  • 13,224
  • 4
  • 41
  • 66
  • I am using overflow-x:hidden because I don't want the horizontal bar (the content in the Iframe will never get wider - and it fits the current width) – JGow Sep 06 '11 at 12:54
1

try to set the overflow-y:scroll; explicitly on the iframe, also, you probably need to set overflow:hidden; to the container (parent element) of the iframe, as per this other answer: Safari/Chrome (Webkit) - Cannot hide iframe vertical scrollbar.

Community
  • 1
  • 1
Meligy
  • 35,654
  • 11
  • 85
  • 109
0

I had to set the height on the page that is being displayed in the iframe.

It was tricky due to the fact that the page is actually a sharepoint webpart with everything being created dynamically in VB

Thanks for your answers.

JGow
  • 55
  • 1
  • 7