Subject: FW: [css-d] ems or percent?

From: matt.davey at dsl.pipex.com (Matthew Davey)
Date: Sat, 26 Apr 2003 19:55:57 +0100

Damn outlook.

-----Original Message-----
From: Matthew Davey [mailto:[email-masked]] 
Sent: Saturday, April 26, 2003 7:45 PM
To: 'Joel Young'
Subject: RE: [css-d] ems or percent?

Joel,

The way I've found to use these (and avoid the broken box model as much
as possible) it to decale the follwing in you style sheet:

body {
	font-size: 100%;
}

P (or your divs or whatever) {
	font-size: 0.8em;
	line-height: 1.166667em;
}

This give you the equivalent of 12px font sizing, and a 17.5px line
height.

The body { font-size: 100%; } should avoid it inheriting, as would
explicitly declaring all tags you use with { font-size:0.8em; } This
works in every windows browser that I've been able to find a download
for, though I don't own to a mac, so I don't know about those.

For sizing reference, 1em = 15px.

Matt

}-----Original Message-----
}From: [email-masked] 
}[mailto:[email-masked]] On Behalf Of Joel Young
}Sent: Saturday, April 26, 2003 6:50 PM
}To: [email-masked]
}Subject: [css-d] ems or percent?
}
}
}If this has been asked recently, I apologize for the repeat. 
}Feel free to 
}direct me to the thread if you like.
}
}I've been doing some testing with ems and %'s. I like the 
}versatility of 
}both, but which is better in today's browser compatibility 
}climate? I'm 
}concerned mostly about consistent results while avoiding the tiny text 
}syndrome that can occur on a Mac. (I don't have a Mac, so all 
}my design is 
}PC oriented.)
}
}My main goal is to design with less-than-default-size text, 
}but still give 
}users the ability to change it if they want to.
}
}TIA,
}
}Joel
}
}______________________________________________________________________
}css-discuss [[email-masked]]
}http://www.css-discuss.org/mailman/listinfo/css-d
}Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
}

---

From: mrmazda at ij.net (Felix Miata)
Date: Sat, 26 Apr 2003 15:23:50 -0400

> This give you the equivalent of 12px font sizing

.8em gives a little over a half size character box on a system that is
using the windoze common default of 12pt/16px@96DPI. (144 dot box vs 256
dot box; 56.25%).
 
> For sizing reference, 1em = 15px.

For what reference? 15px=1em if and only if the default size is 15px,
which is not the default case for any browser as a virgin installation
on any virgin PC OS. Netscape 4, IE6 & Mozilla/Netscape 6+ all default
to 16px/12pt. Windoze defaults to 96DPI. For IE6 you can see the few
instances where 15px would be the default in the charts at
http://members.ij.net/mrmazda/auth/absolute-sizes-IE6.html
-- 
"The object and practice of liberty lies in the limitation of
governmental power."                General Douglas MacArthur

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://members.ij.net/mrmazda/auth/auth.html

---

From: knaepkens.luc at pandora.be (Luc)
Date: Sat, 26 Apr 2003 21:28:28 +0200

Good evening Matthew,  

It was foretold that on 26-4-2003 @ 19:55:57 GMT+0100 (which was
20:55:57 where I live) Matthew Davey would mumble:

<snipped a bit>

MD> For sizing reference, 1em = 15px.
  
Matthew,  how  do  you  get  that value of 15px? In your example there
aren't  any  px set, only 100% (body) and ems.

I  thought  that  the  'em'  unit  equals  the  computed  value of the
'font-size'  property  of the element on which it is used, except when
it  occurs  in  the  value of the 'font-size' property itself. In that
case it refers to the font size of the parent element.

Or am i missing something fundamental here? (probably yes)
 
Best regards,
 Luc

--------------------------------------------
Powered by The Bat! version 1.63 Beta/7 with Windows 2000 (build
2195), version 5.0 Service Pack 3 and using the best browser: Opera.

"Men were made for war. Without it they wandered greyly about, getting
under the feet of the women, who were trying to organize the really
important things of life." - Alice Thomas Ellis
--------------------------------------------