[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgi-list
Subject:    Re: [CGI] screen resolutions
From:       "Tony Lewis" <tlewis () exelana ! com>
Date:       2003-05-11 1:08:22
[Download RAW message or body]

MJ wrote:


> I have been facing this problem for quite some time to
> accomodate my html pages to different screen
> resolutions.
> 
> Further, different browsers make the problem still
> worse by making the html pages distorted a lot from
> what was designed.
> 
> Even the font gets changed in some client systems.
> 
> Is there anyway / policy we could make our html pages
> look uniform in all the browsers and in different
> resolutions. Also, is there any font that is very
> widely used for such compatibility.

It sounds like what you need are cascading style sheets.

No, there are no fonts that you can uniformly depend on. That's why you need
to cascade through them.

Here's an example style sheet that I use for headings:

<style>
<!--
  h1 {font-size: 200%; font-family: Helvetica, Arial, sans-serif;
font-weight: bold}
  h2 {font-size: 150%; font-family: Helvetica, Arial, sans-serif;
font-weight: bold}
  h3 {font-size: 120%; font-family: Helvetica, Arial, sans-serif;
font-weight: bold}
  h4 {font-size: 100%; font-family: Helvetica, Arial, sans-serif;
font-weight: bold}
-->
</style>

You will notice that the fonts are Helvetica (good for Macs), Arial (good
for Windows), and then any sans-serif font the browser has available. That
is, it cascades through the fonts in that order.

Also note that the style does not use absolute sizes, but scales based on
the font size the user has selected. Most browsers allow the user to select
from among five font sizes (For example, IE has Largest, Larger, Medium,
Smaller, and Smallest). If a person with sight problems has chosen
"Largest", you don't want to force them into a 10 point font.

Hope that helps.

Tony

--
To unusbcribe, send an email contining the words: 'unsubscribe cgi-list' to the \
following email address: majordomo@jann.com

Archives of the following mailing lists are available at: http://www.perl.jann.com/
the CGI Mailing List
the mod_perl mailing list
the embperl mailing list
Searching, browsing and posting are available at http://www.perl.jann.com/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic