Different Screen Res

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
ScottCFR
Forum Commoner
Posts: 33
Joined: Sat Jun 19, 2010 7:36 pm

Different Screen Res

Post by ScottCFR »

I was having a friend test my site, he has a HD monitor with 1024 x 760 I think. He says my site looks weird for him, so is there a way to detect resolution and change certain things according to that?

Thanks,
Scott W.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Different Screen Res

Post by pickle »

Yes.

Javascript can detect screen resolution. Your best bet though is to design your site for 1024 x 768 - as that's what the majority of web users have.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
ScottCFR
Forum Commoner
Posts: 33
Joined: Sat Jun 19, 2010 7:36 pm

Re: Different Screen Res

Post by ScottCFR »

Well, a lot of my other friends use around 1440 x 900 which is what I use. I want it to look good for everybody is what I am trying to say.
User avatar
Pazuzu156
Forum Contributor
Posts: 241
Joined: Sat Nov 20, 2010 9:00 pm
Location: GA, USA
Contact:

Re: Different Screen Res

Post by Pazuzu156 »

In my designs, I always design so the page has a tad bit of space on the left and right of the page content. To make your content user friendly for different resolutions, use percents in your designs. like:

css:

Code: Select all

#idName {
  position:absolute;
  width:90%;
  left:5%;
  right:5%;
}
HTML:

Code: Select all

<body>
<div id="idName">
My Content here
</div>
</body>
These days, HTML 5 is beginning to show itself in browsers, <canvas> is put in place of <div> to better edit the actual page and give you more manipulation ability in your design and make it extra user friendly/
- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
Post Reply