Joly
Joly

Reputation: 3276

Remove scroll bars from iFrames in IE8

I am using the following jQuery line in order to remove scroll bars from iFrames on a web page:

$("iframe").css("overflow", "hidden").attr("scrolling", "no");

This works in Chrome and FF but not in IE8.

Any ideas what would require to make it work there?

Thanks

Upvotes: 0

Views: 84

Answers (2)

smnbbrv
smnbbrv

Reputation: 24561

I guess you are talking about not IFRAME's scrollbars, but about inner HTML. Remove scrollbars from html and body elements in the HTML you display in IFRAME as well, e.g.:

$($("iframe")[0].contentDocument).find("html,body").css("overflow","hidden");

Upvotes: 0

Anup
Anup

Reputation: 9738

iframe {
   overflow: hidden;
}

Upvotes: 1

Related Questions