Coder Perfect

Remove the iframe’s scrollbar.

Problem

Using this code

<iframe frameborder="0" style="height: 185px; overflow:scroll; width: 100%" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=main" marginheight="1" marginwidth="1" name="cboxmain" id="cboxmain" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true"></iframe>

This is how it appears (the shoutbox on homepage of http://www.talkjesus.com)

How can I get rid of the horizontal scrollbar and change the vertical scrollbar’s CSS?

Asked by Faith In Unseen Things

Solution #1

The iframe should have the scrolling=”no” attribute.

Answered by Dean Oakley

Solution #2

This is compatible with all browsers.

<iframe src="http://buythecity.com"  scrolling="no" style=" width: 550px; height: 500px;  overflow: hidden;" ></iframe>

Answered by Thyagarajan C

Solution #3

I had to apply style=”overflow:hidden” to the body of the html content loaded inside the iframe because adding scroll=”no” and style=”overflow:hidden” to the iframe didn’t work.

Answered by nirvana74v

Solution #4

Add the scrolling=”no” element as seen below:

Answered by Allabux B

Solution #5

Simply add the attributes scrolling=”no” and seamless=”seamless” to the iframe tag. as follows:-

 1. XHTML => scrolling="no"
 2. HTML5 => seamless="seamless"

UPDATE:

In all major browsers, the seamless attribute has been removed.

Answered by Nima Rahbar

Post is based on https://stackoverflow.com/questions/10082155/remove-scrollbar-from-iframe