Hide horizontal scrollbar on an iframe?

nkcmr picture nkcmr · Jan 31, 2011 · Viewed 298.7k times · Source

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

Answer

Chase Florell picture Chase Florell · Jan 31, 2011

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>