Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable scrolling for an iframe in chrome

http://www.mbe-martinique.fr/emballage-et-expedition/suivi-colis

I have used the scrolling attribute, which works for Firefox but not for chrome. I have also used overflow:hidden css, but it doesn't seem to work either.

A vertical scroll bar is not seen, but the iframe scrolls vertically on mouse-wheel, which is exactly what i want to disable.

Kindly suggest as to how I move forward!

like image 736
Shiba Salvi Avatar asked Oct 21 '25 12:10

Shiba Salvi


1 Answers

Try to hidden the scroll bar with parent element like this example:

div {
  overflow: hidden;
  width: 300px;
  height: 300px;
}

iframe {
  border: none;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
}
<div>
  <iframe src="https://fiddle.jshell.net"></iframe>
</div>

Fiddle demo

like image 99
Zeev Katz Avatar answered Oct 23 '25 00:10

Zeev Katz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!