Scrolling = no! does not hide the scroll

According to the “w3c validator,” the scroll attribute in the iframe element is deprecated. This means that for iFrame there is an equivalent CSS Scrolling = "no".

I tried: Overflow: hidden; but without success.

Here is an example with:

1) Scrolling = "no" (works great)

but w3c complains

2) Scrolling = "no" CSS equivalent (it does not work because it shows scrolling)

+4
source share
2 answers
 scroll: 'no' 

Not a valid CSS attribute.

IE is known to have problems with iFrames and the CSS overflow attribute.

Indeed, the best solution here is to use scrolling="no" inside your iFrame tag. It is true that it does not comply with W3 standards, but no client will run away from your site because it has problems with W3 standards. The average person has no idea what a web standard is, let alone W3.

+4
source

below javascript worked for me in FF, chrome and IE

 var el = document.getElementById("iframeid") el.scrolling = "no"; //FF & Chrome el.contentWindow.document.documentElement.style.overflow="hidden"; //IE 
+1
source

All Articles