简体   繁体   中英

Remove/disable scrollbars from dialog box - Firefox

I am opening a dialog box with custom width and height using the following code.

window.showModalDialog(" & _"'" & dlgURL & "',window,'dialogWidth:" & width & "px;dialogHeight:" & height & "px;overflow:auto;scrollbars:no;center:yes');"

The problem which I am facing here is , vertical and horizontal scroll bars are visible in the dialog box. Even if we scroll down, there is no contents. Can anyone tell me how to disable these scrollbars for Firefox browsers. I tried overflow:auto property. But no use.

overflow does not seem to be a valid property for showModalDialog if you look at the specs: https://developer.mozilla.org/en-US/docs/DOM/window.showModalDialog

Try setting scroll to 0 .

This sample seems to work: no scrollbars on my FF.

http://jsfiddle.net/xA9Nm/1/

window.showModalDialog('http://www.december.com/html/demo/hello.html',window,'dialogWidth:600px;dialogHeight:500px;center:yes');

I suggest to check if, for some reason, the content inside the page is bigger then dialog size

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM