I want these to be in monospace, but monospace fonts are typically
bigger looking than proportional fonts so I want to reduce the font
size a bit. This leads me as an author to write
kbd, samp { font-family: monospace; font-size: 90% }
But _because_ monospace fonts are typically too big, as a user
browsing other authors' Web pages I've told Mozilla to render
monospace as 15px (compared to 17px for serif and sans).
Here's the conflict: Mozilla seems to apply that 90% not to the
font-size of the enclosing <p> but rather to the 15px user
specification. So I end up with monospace text that is too small.
But if I don't assign a font size, then users who never set their
monospace size see monospace that is too big.
What's wrong in my thinking here? Please understand that I'm not
asking a Mozilla question; I just mentioned Mozilla as an
illustration of what one browser does. My question is how I, as an
author, should style KBD and SAMP so that the size of monospace
looks about right, namely ust a bit less tall than the surrounding
normal text.
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/