Jump to content

The <iframe> scrolling attribute is not supported in HTML5. Use CSS instead.


ssadfaf

Recommended Posts

http://www.w3schools.com/tags/att_iframe_scrolling

How?

I placed 'overflow' attribute

<iframe width="260" style="min-height:250px; overflow:hidden; float:bottom; border:0" src="../htm/linkz.html">

but only FF understood it correctly.

Opera-next, Chrome ignore this attribute.

 

I want to use only HTML5 specs , is it possible to solve using only HTML5?

And will it be correct to use 'overflow' att. in the future, when all browsers will support html5?

 

TY in advance

Edited by ssadfaf
Link to comment
Share on other sites

min-height is not valid for iframe. You have to have a fixed width and height and only then will overflow: hidden; work. Also, float: bottom; is not valid.

TY!

I removed min-height and float, but with no effect for scroll bars.

I made it so:

<iframe scrolling="no" width="260" style="overflow:hidden; border:0" src="../htm/linkz.html">

It works everywhere. Hope, it will work also in the future browsers.

Link to comment
Share on other sites

Try <iframe style="scrolling=no width=260 overflow:hidden; border:0" src="../htm/linkz.html"> and see if that works.

TY!

I removed min-height and float, but with no effect for scroll bars.

I made it so:

<iframe scrolling="no" width="260" style="overflow:hidden; border:0" src="../htm/linkz.html">

It works everywhere. Hope, it will work also in the future browsers.

 

Link to comment
Share on other sites

What! if, you use outer container to hide scrollbars,

    .hide_scroll{width:260px;overflow:hidden; height:200px;}    .hide_scroll iframe { width:276px; height: 217px; overflow:scroll; border:0; }        <div class="hide_scroll"><iframe src="../htm/linkz.html"></iframe></div>

 

  • Like 1
Link to comment
Share on other sites

Try <iframe style="scrolling=no width=260 overflow:hidden; border:0" src="../htm/linkz.html"> and see if that works.

 

I'm afraid is this neither HTML nor CSS notation.

 

 

What! if, you use outer container to hide scrollbars,

    .hide_scroll{width:260px;overflow:hidden; height:200px;}    .hide_scroll iframe { width:276px; height: 217px; overflow:scroll; border:0; }        <div class="hide_scroll"><iframe src="../htm/linkz.html"></iframe></div>

Very good proposal, TY.

BUT sometimes I need to use iframe width:100%, so I cannot use it universally.

Edited by ssadfaf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...