Welcome to WebmasterWorld Guest from 54.224.148.71

Forum Moderators: incrediBILL

Message Too Old, No Replies

How to remove the iFrame scrollbars

     
7:16 pm on Sep 3, 2011 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Hi,

I wonder why the following iFrame has scrollbars:

<iframe width='600' height='200' frameborder='0' scrolling='no' src='https://docs.google.com/spreadsheet/pub?hl=en_US&key=0Aliqp0kGPjWsdERacHFDVzNzb1N3RHREZzYwVGQ5OVE&output=html&widget=true&chrome=false'></iframe>


Thanks in advance!
Mike
8:52 pm on Sept 3, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


The IFRAME doesn't, but an element (a DIV) inside the framed document does.
8:59 pm on Sept 3, 2011 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 2, 2003
posts: 954
votes: 4


Hi there Rain Lover,

if you don't want scrollbars then you will have to change the iframe width and height attributes. ;)

So...
<iframe width='800' height='254'...

...instead of...
<iframe width='600' height='200'...

bidbrain
6:29 pm on Sept 13, 2011 (gmt 0)

New User

joined:Sept 13, 2011
posts:3
votes: 0


If you don't want to have scrollbars, you can use "overflow" CSS property.

overflow:hidden;

should do the job. If you use this, everything looks the same except there are no scrollbars. So some of the content may not be shown. And of course, this works only if you can modify the CSS of the iframed document.