View Full Version : Developing for 800x600 & 1024x768

Feb 28th, 2003, 01:42 AM
I have a web site that is getting quite indepth. The site is originally setup for 1024x768. About 5-10% of my visitors use 800x600, so I have developed 2 sides: 1-800x600 & 1-1024x768.

With that in mind, I have the enter page check the vistor's resolution and then it sends them to the appropriate side of the web site.

I don't want to keep duplicating code for each side. I could just setup the site for 800x600, but with the frames it looks so much better in the higher resolution.

Is there an easy way to have the browser check the resolution (which it is currently doing) and have it scale the frames, images, and text to match?

The site is www.bbtaekwondo.com.


Feb 28th, 2003, 03:01 AM
do you know javascript, this would take a little code on all of your pages and images and frame, to get the resolution in javascript:
<script type="text/javascript">
width = screen.width;
height = screen.height;
then you will have to make the images respectively like this

<img src="blah.jpg" height="height/3" width="width/3">

that would make the image 1 third of the width of the page and 1 third the height of the page (kind of big i know). the same holds true for frames and such.

Feb 28th, 2003, 04:10 AM
You also could use percentages on your tables so its dynamic based on the available screen size.

Feb 28th, 2003, 09:19 AM
I do know javascript and that is how I'm getting their screen resolution. I have been using the formula of 800x600 is %78 of 1024x768.

That doesn't fix the text size, of course. I guess I could probably use style sheets for most of the rest. Either way, it looks like quite a bit of work ahead of me.

I was just hoping there might be something out there that I hadn't seen yet.


Feb 28th, 2003, 04:15 PM
Perhaps you misunderstood me, I ment use percentages as in you do something like this:

<table width="80%">

Where the table is 80% of the available screen size, and the text of course will auto wrap to fit the table size.

Feb 28th, 2003, 11:32 PM
No, I did catch that. With some of the text, it needs to fit on one line. I do use percentages for some of my tables. It will work with most of the page.

I think I just need to go back through and redesign some of the pages. We were in such a hurry to get the page up and going that I used didn't spend as much time in the design and layout phase that I should have. Now I'll pay for it in the extra time. But, that's human nature for you - LBN (lazy by nature).

Hmm, percentages for my tables and images and style sheets for my fonts should work if I do it right. Call my function in an onload statement to determine which css to use.

Thanks for the help. Sometimes you just need to talk (or type) outloud to work it out in the mind, at least for me. Although I've had a few friends laugh at me because I talk to myself while I'm working on things.


select sires
Mar 6th, 2003, 06:13 AM
Originally posted by chrismiceli

<img src="blah.jpg" height="height/3" width="width/3">

will this work for any image? if i am linking an image that is hosted on another site, but wanted it to be smaller when
viewed on my site, can i just enter that in the code?

Mar 6th, 2003, 04:18 PM
It should.

Mar 6th, 2003, 04:48 PM
wouldn't you have to document.write() in every image tag though?
surely the html <img tag wouldn't recognise the defined javascript variable height, let alone the division operator.