Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide horizontal scrollbar on an iframe?

I need to hide the horizontal scollbar on an iframe using css, jquery or js.

like image 895
nkcmr Avatar asked Jan 31 '11 22:01

nkcmr


People also ask

How can I hide scrollbar in iFrame but still scroll?

1. Set the overflow of the parent div as hidden. 2. Set the overflow of the child div to auto and the width 200% (or anything more than 100%, or more than the width of the parent - so that the scrollbar gets hidden).

How do I get rid of the scroll bar in iFrame?

A simpler way is however, is to use a container div styled with overflow: hidden; to hide the scrollbar. Set the width and the height of the div, to be slightly less than that of your iframe. Hope this helps you.

How do I hide the horizontal scrollbar?

To hide the horizontal scrollbar and prevent horizontal scrolling, use overflow-x: hidden: HTML. CSS.

How do I hide the scrollbar in embed?

Use your embed tag inside a container with overflow hidden. Then set the width of the embed with 100% + 17px (the default width of a scrollbar).


2 Answers

I'd suggest doing this with a combination of

  1. CSS overflow-y: hidden;
  2. scrolling="no" (for HTML4)
  3. and seamless="seamless" (for HTML5)*

* The seamless attribute has been removed from the standard, and no browsers support it.


.foo {    width: 200px;    height: 200px;    overflow-y: hidden;  }
<iframe src="https://bing.com"           class="foo"           scrolling="no" >  </iframe>
like image 175
Chase Florell Avatar answered Oct 03 '22 07:10

Chase Florell


set scrolling="no" attribute in your iframe.

like image 21
Rahul Dadhich Avatar answered Oct 03 '22 07:10

Rahul Dadhich