tags:

views:

59

answers:

3

Hi I want to disable the resizing the html web page by the user. How to do that I want to disable the resize button and manual resizing by dragging. pls help

+2  A: 

Pardon? Are you talking about resizing the browser window? If that's the case then you can't do this in HTML, or JavaScript as it would be a security risk allow web pages to control browsers behaviour.

If you want to get rid of scroll bars you can set the body tag to 'overflow: hidden' in CSS?

Alex
yes I am talking about resizing the browser window
ganuke
+6  A: 

You can't, thank God.

When you open a new popup you can request it be unresizable using the feature resizable:

window.open('something.html', '_blank', 'resizable=no');

however modern browsers may ignore your request as it is considered egregiously user-hostile.

Use liquid layout to make your page respond flexibly to changes in window size, rather than attempting to set it in concrete. The web is inherently a variable-size medium, and mobile browser users get no input in how large their screen is anyway.

bobince
Hmm. This works for IE but not for firefox. I wnated to do it only for ie and firefox. So can you pls tell me how to do it with forefox
ganuke
Firefox disables it by default. You can go to `about:config` and alter the value `dom.disable_window_open_feature.resizable` to re-enable the feature on your copy of Firefox.
bobince
A: 

If you mean to stop the page shrinking and expanding in sympathy with browser window size, then use fixed width elements as supposed to relative (%)

Tom Gullen