Home » Jquery » javascript – How to include an iframe(without scroll) within masterpage (with scroll)-Exceptionshub

javascript – How to include an iframe(without scroll) within masterpage (with scroll)-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

enter image description hereI’ve tried

scrolling="no" height=100%, overflow:hidden

it’s not worked out.When i’m trying to add height in pixel like

style="height:4000px;"

iframe’s background-image pixel get damaged.Looking for a solution without setting height. Please help me to solve this.

current Code
HTML code

<div class="header_bar">
<div class="tab_active"   onclick="location.href='...'">Tab1</div>
<div class="tab_inactive" onclick="location.href='...'">Tab2</div>
<div class="tab_inactive" onclick="location.href='...'">Tab3</div>
</div>
<div class="iframe_container">
<iframe id="main_iframe" class="main_iframe" frameborder="0" src="http://en.wikipedia.org/wiki/Special:Random">
</iframe>
</div>
<div class="header_bar">
<div class="tab_active"   onclick="location.href='...'">Tab1</div>
<div class="tab_inactive" onclick="location.href='...'">Tab2</div>
<div class="tab_inactive" onclick="location.href='...'">Tab3</div>
</div>  

CSS

html { height:100% }
body { height:100%; width:100%; margin:0; display:table;}
.header_bar {display:table-row; }
.iframe_container {height:100%; display:table-cell; }
iframe { height:100%; width:100%; display:block; }

I don’t want the iframes scroll.

How to&Answer:

Add scrolling="no" to ifram tag like this :

<iframe id="main_iframe" class="main_iframe" scrolling="no" frameborder="0" src="http://en.wikipedia.org/wiki/Special:Random"></ifram>