Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iframe, full screen css - why the scrollbar

Tags:

css

iframe

I want to make on iframe full screen. Here is the code:

http://jsbin.com/ibopes/1/edit

and here is the demo:

http://jsbin.com/ibopes

Why the scrollbar? For some reason I can't use position: absolute for the iframe, and I don't want overflow: hidden on body.

How to hide the scrollbar, and why is it there?

like image 620
Tamás Pap Avatar asked Jan 14 '23 13:01

Tamás Pap


1 Answers

Specify display: block on your iFrame. jsBin normalizes the CSS for you:

#test {  
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: none;
    background: #ff0000;
    display: block;
}

See the working demo here > http://jsbin.com/ibopes/5

like image 71
BenM Avatar answered Jan 22 '23 12:01

BenM