javascript - How to hide horizontal scroll bar in an iframe -
i have in iframe
horizontal scroll , want remove . how can make possible? horizontal scroll bar: want disappear. how can it? i've tried many examples none of them working me.
<head> <title></title> <link href="menu.css" rel="stylesheet" type="text/css" /> <script src="script/jquery-1.11.1.min.js"></script> <style> #iframe{ width:790px; height:1000px; background: #ffffff; overflow-y:scroll; } </style> </head> <body> <div style="margin-left:auto;margin-right:auto"> <ul class="dropdown"> <li class="drop"> <a href="#">about us</a> </li> <li class="drop"> <a href="#">contact us</a> </li> <li class="drop"> <a href="#">services</a> </li> <li> <a href="#">address</a> </li> </ul> </div> <div id="div1" style="width:772px; height:auto; margin-left:auto;margin-right:auto"> <iframe id="iframe" scrolling="no" frameborder="0" onload="window.scrollto(0, 0)" src="http://www.myhotels24.eu/fibe.aspx?hid=10000&chid=0&rate=ibe&css=brown" allowtransparency="true"></iframe> </div> </body>
your problems linked css. how code should like:
#div1 { width: 772px; max-height: 200px; margin-left:auto; margin-right:auto; overflow-y: scroll; overflow-x: hidden; } #iframe{ width: 790px; height: 1000px; background: #ffffff; }
the reason why having problems because should define overflow: scroll
upper div1
containing iframe. if give max-height
, define overflow-y: scroll
, overflow-y: hidden
works.
this jsfiddle.
Comments
Post a Comment