Resize Browser Window

Is there a method to resize the browser window to a user-defined choice?
I want to provide two buttons to resize the entire browser window to 1440x900 and 1900x1080. I can’t do it within the browser window because I am using some floats with position fixed.
I need a button that will resize the window to these sizes. Has anyone done this?

Most browser have disabled window.resize for open tabs.
The only thing that is possible is opening a new window with a specific size.
window.open("http://www.google.com/","mywindow","width=600, height=600");
After that you can use window.resize.

1 Like