Skip to content Skip to sidebar Skip to footer

How To Add Scrollbars In Iframe

I want to add scrollbars in my iframe. Below is my code. I am writi

Solution 1:

scrolling="yes" and also frameborder aren't valid HTML5 attributes anymore. They can't be found in the list of allowed attributes, see: W3C: 4.7.6. The iframe element or MDN: <iframe>.

Use CSS instead:

iframe {
    overflow: scroll;
    width: 1349px;
    height: 100%;
    border: 1px solid black;
}

But actually all browsers show the scrollbars right away if needed.

Demo

Try before buy


Solution 2:

you were missing scrolling="yes" in your code try the following code

<iframe src="http://www.w3schools.com"  width="1349px" height="100%" scrolling="yes">
</iframe>

Solution 3:

Change the scrolling attribute to

scrolling="yes"

Solution 4:

Change scrolling="auto" to scrolling="yes" and add frameborder="1"

Try the style:

iframe {
   border: 1px solid #000 !important;
   overflow: scroll !important;
}

Solution 5:

This is not an issue with Firefox, ie, or edge.

The way i solved my particular issue is removing a class's overflow: auto and replacing it with the following on the parent of (in my current case) a table

class {
 overflow-y: scroll !important;
}

Post a Comment for "How To Add Scrollbars In Iframe"