views:

410

answers:

2

I have an iframe with scrolling=yes. Is it possible to fully hide scrollbar using CSS for the Mozilla FireFox browser?

For instance, on the Internet Explorer I'm using this: Overflow-x: hidden; Overflow-y: hidden; - and it hides scrollbars, but FireFox ignores this CSS.

Here is screenshot from IE:

alt text

Here is screenshot from FireFox:

alt text

I forgot to mention that I put CSS, to say exactly like this <style>body { overflow:hidden; }</style> inside the iframe. I can't put class to iframe itself like <iframe class="...">

Iframe is put inside the <DIV>...</DIV>. I use it like a modal window.

+1  A: 

Have you tried setting explicit values for width/height on either the iframe or parent container? Also, does your iFrame contain anything?

EDIT: Try:

div {overflow:hidden;}
div iframe {border:0;overflow:hidden;}

in your actual page that contains the div.

edl
Yeah, I have width="100%" height="100%" on iframe setting! I have a registration form in the iframe.
ilnur777
Ahh. Ok, border adds to the dimensions so your iframe is actually getting bigger than the viewport. Try border:0; Unless you actually need to see the iframe?
edl
I guess you can't edit your comments or im too scrubby to do so? The basic deal is, when you have anything that is 100% of it's container and anything adds additional border, padding or margin, it's going to generate a scrollbar. You might try posting your entire code along with all the css rules you are using. Otherwise, I can only guess. :)
edl
@edl: There's a 5 or 10 minute window for editing the comments
sshow
+1  A: 

DEMO: http://jsbin.com/ewomi3/15

iframe { overflow:hidden; }

Assuming you have something like this:

<iframe src="#" width=100% height=100% marginwidth=0 marginheight=0 frameborder=0 scrolling=yes></iframe>
aSeptik