...

View Full Version : Developing for 800x600 & 1024x768



nickoli21
02-28-2003, 02: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.

Nick

chrismiceli
02-28-2003, 04: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;
</script>
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.

oracleguy
02-28-2003, 05:10 AM
You also could use percentages on your tables so its dynamic based on the available screen size.

nickoli21
02-28-2003, 10: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.

Nick

oracleguy
02-28-2003, 05: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.

nickoli21
03-01-2003, 12:32 AM
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.

Nick

select sires
03-06-2003, 07: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?

oracleguy
03-06-2003, 05:18 PM
It should.

Íkii
03-06-2003, 05: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum