How to remove Horizontal Scrollbar in iFrames?
I have a webpage that is using iFrames.
Is there anyway I can remove the horizontal scrollbar and enable only the vertical scrollbar in the iFrame?
I have literally broken my head over this the past few days and searched on the net as well.
Code:
<p><iframe name="I2" allowTransparency="true" marginwidth="1" marginheight="1" align="right" border="0" frameborder="0" width="550" height="280" scrolling="auto" src="test1.htm" style="border: 2px solid #D0D0D0; padding: 0">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></p>
The source page "test1.htm" is exactly 550x280 pixels (I made it in Fireworks 3). But when I put the scrolling="auto" both scrollbars appear for some reason. What I want is that just the vertical scrollbar should come but NOT the horizontal bar, even if the damned source page exceeds the iFrame length.
I tried the following code but it never worked (am I doing anything wrong)
Code:
<p><iframe name="I2" allowTransparency="true" marginwidth="1" marginheight="1" align="right" border="0" frameborder="0" width="550" height="280" scrolling="auto" src="test1.htm" style="overflow-x: hidden; border: 2px solid #D0D0D0; padding: 0">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></p>
But it didn't work (when I put the preview in MicroSoft FrontPage in IE6). I even tried overflow-x: hidden; overflow-y: auto;
in the style thing of the iFrame tag.
Somebody please help. This is getting really bugging.
Pardon the long code.