Creativebits.org

an All Creative World site
kenyabob's picture
303 pencils

Window Resize on Steroids.

Here's the question: I need to make a window resize function that will resize the window to 900px wide and maximum height. That is phase one. I have had trouble with that, because I don't know what exactly to put in for "maximum height." I can't very well go window.resize (950,max). Anyhow, that's question number one. Number Two, and here is the scorcher, how to I get that script to kick in only if the window is less that 900 wide? I mean, if this guy comes to my site browsing with a window a thousand px wide, who am I to make it smaller? Any ideas on this one?

Here is the site as well

Commenting on this Forum topic is closed.

phatcactus's picture
109 pencils

Who are you to make it bigger, anyway?

yoelnino's picture

maybe you should rethink the sizing of your site. Proper web etiquette is to design for the viewer and not yourself. Because you don't know what the viewer specs are... you should aim for designing at 800x600 max. But that's just my 2 cents on your situation

JimD's picture
2617 pencils

Or 80%?

1024x768 is by far and away the standard monitor resolution for the last few years, so a 900 wide page is a good size.

That being said, most people absolutely hate when you force their page to resize, have a pop-up window, hide toolbars, etc... In fact, most browsers have an option to turn off the javascript code to pop-up windows, resize, etc... so your hard work coding it to open the window just right is down the drain because they have their browser override it.

It's best just to build your site to accommodate different widths. Take most Blogs for example. The content is set in a fixed-width area no matter how large the window is - the background just fills the rest of the space.

Get your fix of design software tips, tricks & commentary.

—

-----------
Visit The Graphic Mac for graphics and Mac OS tips, reviews, tutorials and discussion.

kenyabob's picture
303 pencils

And that's just the thing, I don't want to be obtrusive. I only want the width to resize so people don't deal with the scrollbar. I am not looking for a pop-up, or a way to hide the toolbar. Though, I do see all the points offered here, and I will take it into consideration.

phatcactus's picture
109 pencils

If people are bothered by the scrollbar, they'll resize the window themselves. You don't have to hold their hand every step of the way. Part of the challenge of designing for the web is that you cannot have any idea as to how your page is going to look on the receiving end. It's something you deal with, and learn to build into your design.

Sites that resize my browser window get closed, easy-peasy. The internet is so full of information that anything that can be had from that site can likely be had from a number of others.

Ivan's picture

I think 800x600 is not a standard size anymore. More than 90% of ppl use at least one size bigger resolutions.

I too hate sites that resize my windows. The only case when I don't mind is when a certain link extends in a pop-up that resizes to show only the required amount of space.

bean_ae's picture
1 pencil

If you're willing to risk it; the javascript property is called screen.height. Useage: resizeTo(900,window.height);

Creativebits is a blog about creativity, design and Macs. We also have a critique section where you can post your work to get opinions and a forum to discuss any design related topics.

Recommend us on Google

Latest critique

Do you need a great new logo?

If you need a logo for your company or product you can get it done with us.
In our logo store you can pick from over 28,000 pre-made logos that will be customized to your name for free or you can post a contest for us for just $250 and our designers from all over the world will submit dozens of logo design suggestions to your specific needs.

Marketplace