|  | Posted by Alan J. Flavell on 02/15/06 01:21 
On Tue, 14 Feb 2006, Jose wrote:
 > Dunno.  I'm new to CSS too.  But that won't stop me.  This is Usenet.  :)
 >
 > Basically, wherever you use px, don't.
 
 Sort-of, and the rest of the reasoning looked OK.  But px units aren't
 always wrong: they're useful for border widths; also, as far as
 margins and padding are concerned, em units can be good, or px units
 can be good, etc., depending somewhat on context.
 
 And in practical terms, if an object is pixel-sized (as images
 generally are) then asking the browser to re-size them in non-pixel
 units can produce suboptimal results.  Just don't go making images of
 an unreasonable width and demanding that they fit into the reader's
 window - that's rude (BBC news, to take an example, sticks what
 appears to be a completely unnecessary transparent gif specified to be
 of height 1px and width 760px, which I rate as distinctly rude - along
 with a load of other old-fashioned clutter that could be swept away
 with a proper CSS-based design, leaving a much more flexible and
 user-friendly page IMNSHO).
 
 Having said that: there *are* some uses for resizing an image in
 em units - it depends on circumstances.
 
 > If you want space based on the text (for example, margins), use ems.
 
 See, the problem with this is that if someone is visually impaired and
 needs to crank up the text size way above normal, then you're going to
 also inflate the margins - and, as a result, waste a lot of their
 precious display canvas.  The same goes for padding.  So think about
 how your design is going to behave as the text size is changed, as
 well as how it behaves as the canvas size is changed.
 
 If you set margins which don't inflate with the size of the text, the
 results should still be usable, and make more efficient use of the
 canvas. You might finally decide that 1em was the right choice, but at
 least you'll have thought about it.
 
 h t h
 [Back to original message] |