Reputation: 3255
code :
<iframe id="mainiframe" name="mainiframe" src="path" style="width: 100% !important;height:700px;"
scrolling="yes" frameborder="0">
</iframe>
It will display scroll inside iframe when content of iframe exceeds it's height But i want same scroll on browser.
What to do for browser scroll bar ?
Upvotes: 0
Views: 2856
Reputation: 1290
Another solution to this is to add a CSS height property of 100% plus an extra bottom margin pixel to force the scrollbar eg.
html, body {
height: 100%;
margin: 0 0 1px;
}
Upvotes: 2
Reputation: 6860
I'm not sure I'm understanding completely - a browser has that functionality automatically. You might be looking for the CSS overflow-y: scroll
which will force the scrollbar always.
You'll want to put that like so:
html {
overflow-y: scroll;
}
Upvotes: 1