4

I need to remove vertical scrollbar in an iframe. I have tried using overflow: hidden; still not working. Please help.

How it looks now

Code:

#iphone4 {
background-image: url("ipad_new2.png");
background-repeat: no-repeat;
height: 900px;
width: 750px;
margin: auto ;
position: relative;
overflow: hidden;
}


/*Mobile iframe CSS*/
iframe {
height: 700px;
width: 525px;
position: absolute;
top: 68px;
margin: auto ;
left: 61.99px;
overflow-y: scroll;

}

</style>
</head>
<body>
 <div id="iphone4" >
<iframe src="index_atish.html" seamless="seamless"></iframe>
</div>

</body>
</html>
Roman
  • 2,822
  • 4
  • 41
  • 88
Hrushi Patil
  • 43
  • 1
  • 1
  • 6

3 Answers3

9

overflow isn't a solution for HTML5 as the only modern browser which wrongly supports this is Firefox.

A current solution would be to combine the two:

<iframe src="" scrolling="no"></iframe>

iframe { overflow:hidden; }

check This

Community
  • 1
  • 1
Amitesh Kumar
  • 2,983
  • 23
  • 41
2

I think it'll help please check below mentioned link:

<div id="iphone4" >
<iframe src="index_atish.html" seamless="seamless"></iframe>
</div>

/*Mobile iframe CSS*/
iframe {
height: 100%;
width: 100%;
position: absolute;
top: 0;
margin: auto ;
left: 0;
border:none;
}
body{margin:0px;}

https://jsfiddle.net/xnt014a8/2/

-2

you could try

iframe{scrolling="no"}
Bomskie
  • 171
  • 8