I want to add scrollbars in my iframe. Below is my code.
<iframe src="http://www.w3schools.com" width="1349px" height="100%" scrolling="auto">
</iframe>
I am writing this in Drupal 7. Problem is it doesn't show iframe with scrollbars and border. Earlier I simply set the source without width and height and scrolling options and it showed iframe with scrollbars but after adding width and height,it disappeared.
Thanks
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With