Reputation: 2052
My website is available here.
Problem is that I'm getting a double scroll because I used an iframe
to display content in each page of my website.
I tried this:
<iframe ... scrollable="no"></iframe>
and also tried to override the default css by using !important:
.fancybox-overlay, .fancybox-overlay-fixed {
overflow: hidden !important;
}
But nothing is working.
How to fix that?
Upvotes: 2
Views: 166
Reputation: 8921
How about making your parent element fit the page so that the only scrollbar is the one inside the iFrame
and not the other way?
You can do something like this:
.fit {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0
}
.Parent {
border: 2px solid red
}
iframe {
border: 2px solid green;
height: 100%;
width: 100%;
display: block
}
* {
box-sizing: border-box
}
<body>
<div class='Parent fit'>
<iframe class='fit' src='http://stackoverflow.com'></iframe>
</div>
</body>
Upvotes: 3
Reputation: 2599
Try this
<iframe src="https://bing.com"
class="this"
scrolling="no" >
</iframe>
.this {
width: 200px;
height: 200px;
overflow-y: hidden;
}
<iframe src="http://bing.com"
class="this"
scrolling="no" >
</iframe>
Upvotes: 0
Reputation: 344
You need to use the scrolling attribute not scrallable.
source https://www.w3schools.com/tags/att_iframe_scrolling.asp
Upvotes: 0