470,855 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

window size ???

hi !

question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension
becouse i want to have always the same propotion on the sreen even
when i change the screen resolution (640x480 >>> 800x600 >>>1024x756).

thanks for any ideas :)
hawk.
Jul 23 '05 #1
6 6668
pr********@poczta.fm (Thorn) writes:
question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension
becouse i want to have always the same propotion on the sreen even
when i change the screen resolution (640x480 >>> 800x600 >>>1024x756).


I don't know of any browser that does this automatically, but if you
use a pencil to mark your monitor you should be able to line the edges
of the browser window up nicely using whatever your window system's
resize function is.

It might be possible (depending on the browser and the window system)
to write a little routine that did the resize automatically, but
unless you change resolution a lot it's probably more efficient just
to resize it manually with the mouse/keyboard.

Probably a group for windowing systems will give you better ideas than
a group for HTML authoring on the web, though.

--
Chris
Jul 23 '05 #2
Thorn wrote:
question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension
becouse i want to have always the same propotion on the sreen even
when i change the screen resolution (640x480 >>> 800x600 >>>1024x756).


Nothing to do with HTML, I'm afraid, and thus off-topic for this group.
Some browsers may allow you to use Javascript to resize the window
appropriately: you could use a variant of the technique described here:

http://www.themaninblue.com/writing/...ve/2004/09/21/

Try comp.lang.javascript for futher advice.

--
Mark.
http://tranchant.plus.com/
Jul 23 '05 #3
"Thorn" <pr********@poczta.fm> wrote in
comp.infosystems.www.authoring.html:
question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension


No, it's not. If you want to control aspect ratio then publish on
paper. The Web is a fluid medium. Leaving aside the fact that not
everyone who uses the Web can see, you cannot control the window
dimensions.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 23 '05 #4
Mark Tranchant wrote:
question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension
becouse i want to have always the same propotion on the sreen even
when i change the screen resolution (640x480 >>> 800x600 >>>1024x756).

If you use Mozilla or Firefox, then the Web Developer toolbar has a nice
resize window feature that lets you enter the exact size you want. It's
more accurate than just resizing the window manually, and doesn't
require you drawing on your screen with a pencil as Chris Morris suggested.
Nothing to do with HTML, I'm afraid, and thus off-topic for this group.
Some browsers may allow you to use Javascript to resize the window
appropriately: you could use a variant of the technique described here:

http://www.themaninblue.com/writing/...ve/2004/09/21/


Don't use JavaScript to resize a user's window, it's rude. I have my
browser configured so that is not allowed, but not all users know how to
do that, so you will just end up annoying those users.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web
Jul 23 '05 #5
Thorn wrote:
question is very simple: how can i have a window with 30% (width) and
100% (hieght) of my screen. its very important to have such dimension
becouse i want to have always the same propotion on the sreen even
when i change the screen resolution (640x480 >>> 800x600 >>>1024x756).


Really, really bad idea for the reasons other people mentioned. But
because I'm in an evil mood, here's a JavaScript snippet that'll do what
you want in some poorly-configured browsers:

window.resizeTo(screen.width * 0.3, screen.height);
Jul 23 '05 #6
Leif K-Brooks wrote:
because I'm in an evil mood, here's a JavaScript snippet that'll do what
you want in some poorly-configured browsers:
You evil, evil man!
window.resizeTo(screen.width * 0.3, screen.height);


Ah right, that's why I use Firefox! ;-)

--
Brian (remove "invalid" to email me)
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Randell D. | last post: by
6 posts views Thread by David Hayes | last post: by
26 posts views Thread by yb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.