# Setting fixed browser size?

**URL:** <https://forum.kirupa.com/t/setting-fixed-browser-size/263612>\
**Category:** Uncategorized\
**Created:** [June 17, 2008, 6:35pm UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612 "2008-06-17T18:35:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhf80](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jhf80](https://forum.kirupa.com/u/jhf80)\
**Post date:** [June 17, 2008, 6:35pm UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/1 "2008-06-17T18:35:30Z")

</div>

Im not shure this is the right place to post this, but here goes… I’ve just made a flash site that can’t be scaled, and can’t have repeating backgrund, so i need to lock the browser size to the flash dimentions (950x700) Im trying to do this in css but i suck at css and cant get it to work. Iv’e tried using \<body onload=“changeScreenSize(950,700)”\> and

\<script\>  
function changeScreenSize(w,h)  
{  
window.resizeTo( w,h)  
}  
\</script\>

but can’t get it to work… it pops right back to a smaller window and scrolling becomes nessesary…  
I was also hoping for the window not to be scaleable…

Any ideas?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 17, 2008, 6:50pm UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/2 "2008-06-17T18:50:18Z")

</div>

It’s possible, but it’s such incredibly bad practice I’ll hold my tongue ; )

Find a better solution to your problem and you’ll have a better site.

---

<div class="post-metadata">

**Author:** ![jhf80](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jhf80](https://forum.kirupa.com/u/jhf80)\
**Post date:** [June 17, 2008, 7:36pm UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/3 "2008-06-17T19:36:54Z")

</div>

why is it sutch a incredibly bad practice? :s

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 17, 2008, 7:40pm UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/4 "2008-06-17T19:40:39Z")

</div>

Do YOU like it when a site takes control of your browser size?

I hate it, I close down anything that does that in .1 ms. People don’t just have ONE tab open you know (FF, Opera, Safari etc)

---

<div class="post-metadata">

**Author:** ![jhf80](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jhf80](https://forum.kirupa.com/u/jhf80)\
**Post date:** [June 18, 2008, 7:47am UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/5 "2008-06-18T07:47:27Z")

</div>

oh i see :o of course… it rezizes everything, not just my page :-/ … i think ill work around it… add a black fadeout around the edge and go with a center posision and black background or something like that …

---

<div class="post-metadata">

**Author:** ![actionAction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/actionaction/32/3987_2.png) [@actionAction](https://forum.kirupa.com/u/actionAction)\
**Post date:** [June 19, 2008, 5:50am UTC](https://forum.kirupa.com/t/setting-fixed-browser-size/263612/6 "2008-06-19T05:50:03Z")

</div>

I think a better solution would be to open a popup window with fixed width/height, that way you are not screwing up someones surfing experience by locking their window. This is pretty common practice for this exact situation. Sekasi is right, you shouldn’t attempt this with the current window.

If you need to know how to open a centered popup, go here:

> **[Centering JavaScript popup window](https://www.kirupa.com/forum/showthread.php?t=301352)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Embed your flash into the page the call is opening, and set the w,h parameters 950, 700. It’s already setup to not be resizable. This is what you should do. :hr:

```auto
<a href="#" onclick="javascript:popupWin(950,700,'yourflashpage.html');">Enter Site</a>

```
