Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aligning for differing monitors.

Status
Not open for further replies.

GiffordS

Programmer
May 31, 2001
194
0
0
CA
Ok, this is going to sound stupid. I'm a programmer hacking my way through design. I have a page that looks great in a 17" monitor, but all pushed to the side on a 19". I realize the problem is that I am using divisions with static positions to align the elements. What I'm wondering is, is it possible to use percentages in the division tag instead of pixels? If so, will this come back to haunt me later? For example. Div 2 is a layer 2 division, division 3 is a layer 3 division that must reside in an exact position atop divison 2. If I use percentages for division 2, I then must use them for division 3, but the variations in percentages will make the alignment inexact. Help me out here.
 
First, a little remark : your problem is not due to the screen size in inches but to the resolution in pixels (ie : if you set the same resolution (for exemple 1024x768) on both the 17" and 19" screen, your problem should disapear).
Now, to use absolute positionning divs that manage differents resolutions, I think the best way is the following :
- Design your page with good position and size for a target resolution (1024x768 should be a good choice because I think this is the most used one).
- On loading your page, call a function "initPage" (
Code:
<Body onload='initPage();'>
)
- In the function initPage, get the aviable resolution using
Code:
window.clientHeight
and
Code:
window.clientWidth
. Then, recalculate your div's postion and size to make your divs fit the screen. Water is not bad as long as it stays out human body ;-)
 
- Design your page with good position and size for a target resolution (1024x768 should be a good choice because I think this is the most used one).

I don't understand where people get these ideas. Of all the people that I know, every business uses 800x600 resolution, every home user (Except technologically aware) use 800x600. Yes, a lot of people that I know use higher resolutions but all of these people are aware of the ins and outs of computers.

If you are going to build a web page for a target resolution, then use 800x600. If you have a problem with the positioning, then an easy fix is to set it all to remain static at 800x600 of the screen no matter what resolution the user may have.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Hey Wullie, don't get nervous !!!
I proposed 1024x768 because it's the resolution used in most of the clients I visited and I think that nowaday most of people in our developped countries have the hardware to reach these resolutions. By the way, if your target is worldwild, you should prefer 800x600. Water is not bad as long as it stays out human body ;-)
 
Hi mate,

Just because it is possible to set your resolution higher, does not mean that people are either aware or capable of doing it.

If you design for a 1024 resolution, then you are eliminating a lot of users. After all, your clients monitor may be set to 1024 but they are not the ones using their site.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I have set up my style sheets for 2 different resolutions and for different browsers and then use a script in the header of the pages to detect both and then use the correct style sheet. That way I've got my site setup for the major browsers and two of the most used screen resolutions.
 
This is for Targol -

I agree with Wullie in the respect that the DEFAULT screen resolution for a Windows installation is 800x600. True, some people change to 1024x768 but in my experience, they rarely leave it that way because they can't read the text! Changing text size involves a lot more than changing screen resolution.

There's always a better way...
 

Hi,

has anybody seen their pages in XP??
XP by default sets the display higher than 800x600

can't expect everybody to change their display settings
nor can u expect to programm to all the cases

how to ?? ...... anybody?
[hourglass]
 
All over the forums this issue is now under discussion... most 17&quot; plus monitors are up in the 1200 pixel capability and people are using it.

Remember when 800.600 came along, and everone said to keep designing for 640.480, well... here we go again!

I think you have to keeep your desired demographic in mind while designing. If you want to hit an audience of, well, *trailer trash*, go for the low res. - &quot;Oops! I've joined a club that'll have me as a member?&quot; -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top