lordareon
lordareon

Reputation: 1

Make a Unresizable browser window

Im making a web game, but i dont want it to fit on the entire window, i just want something lets say.... 200 x 320, and i want to do a cross browser popup window that canot be resized, there's a way to da that? thanks

Upvotes: 0

Views: 928

Answers (3)

ThiefMaster
ThiefMaster

Reputation: 318488

The proper way is making the browser window itself resizable (and no a popup. thanks.).

Then you create a centered <div> (or <iframe> if you prefer that) which has your preferred size. This allows you to have always the correct size for your game area and you can even put e.g. ads in the area outside (not that anyone appreciates of that, but it's a possibility).

Upvotes: 2

user126284
user126284

Reputation:

You can use window.open:

window.open(, ,'resizable=no, scrollbars=no, width=200, height=320'); 

Upvotes: 1

casablanca
casablanca

Reputation: 70701

There's no way to force a window to be unresizable. The parameters to window.open are simply requests that may be ignored by the browser, and Firefox indeed does this (popups in Firefox can always be resized and the location bar is also always shown).

Upvotes: 3

Related Questions