HighDots Forums  

to em or px or ?? that is the question...

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss to em or px or ?? that is the question... in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mel
 
Posts: n/a

Default to em or px or ?? that is the question... - 02-28-2005 , 02:48 PM






i want my font to look the same size irrespective of screen size, resolution
etc.

is that possible ?

a tiny example would be awwwwwsome :-)

moocho thanks in advance



Reply With Quote
  #2  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: to em or px or ?? that is the question... - 02-28-2005 , 03:25 PM






Mel wrote:
Quote:
i want my font to look the same size irrespective of screen size,
resolution etc.
Then set your browser's defaults to what you prefer. If this is in
reference to a web page you are writing, set your main fonts to a
percentage of 100% in your CSS, such as:

body, td {
font-size: 100%;
}
h1 {
font-size: 150%;
}
h2 {
font-size: 135%;
}
..legalese {
font-size: 85%;
}

Quote:
is that possible ?
Certainly, as above. Do remember that I (and all your other visitors)
prefer to read your site with my own default size, which is 100%.

Quote:
a tiny example would be awwwwwsome :-)
This should get you started.

--
-bts
-This space intentionally left blank.


Reply With Quote
  #3  
Old   
Steve Pugh
 
Posts: n/a

Default Re: to em or px or ?? that is the question... - 02-28-2005 , 03:25 PM



"Mel" <mel.m.heravi (AT) hp (DOT) com> wrote:

Quote:
i want my font to look the same size irrespective of screen size, resolution
etc.
Same size relative to what?

Same physical size? (i.e. always 6mm tall regardless) - use CSS
phsical length units (in, cm, mm, pt, pc) but don't expect browsers to
actually make them the correct physical length. Normally they'll apply
some simplistic length to screen pixels conversion that doesn't take
resolution into account. Also Win IE doesn't allow users to resize
text sized in pt (and possibly the other physical units as well) so
this is a usability and accesibilty problem.

Same subjective size for the user? (i.e. the same visual angle) - in
theory CSS px units should be adjusted so that 1px subtends roughly
the same degree. In practice browsers treat 1px as 1 screen pixel
(which gives the correct angle for "typical" desktop displays. But px
are also unresizable in Win IE so same problem

Same size when compared to an image on the web page? Again px, with
the same problem.

Same size compared with the screen or browser window? (i.e. always
fits ten lines of text on the screen regardless of resolution, etc.) -
not possible with CSS. Could be done with some JavaScript. But if a
user has chosen a larger screen or a higher resolution they could well
have done so in order to see more content at once.

Quote:
is that possible ?
Probably not. Even if it was would it be a good idea? Would you want
the text to be the same size when viewed from less than an arm's
length away on a laptop or palmtop and when viewed from across a room
on a wall mounted display?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #4  
Old   
C A Upsdell
 
Posts: n/a

Default Re: to em or px or ?? that is the question... - 02-28-2005 , 03:35 PM



Mel wrote:
Quote:
i want my font to look the same size irrespective of screen size, resolution
etc.

is that possible ?
Exactly the same size? Yes!! Buy a PC for each of your visitors,
configure each PC identically, and hold a gun to your visitors' heads to
stop them from changing anything.


Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: to em or px or ?? that is the question... - 02-28-2005 , 05:17 PM



Mel wrote:
Quote:
i want my font to look the same size irrespective of screen size, resolution
etc.
Why, you don't care whether people can read it or not?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.