1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

em instead of px and pt in CSS

Discussion in 'CSS' started by EGS, May 15, 2008.

  1. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #21
    Is that in reply to me or someone else?
     
    rochow, May 26, 2008 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #22
    That would be a yes. :)
     
    Dan Schulz, May 26, 2008 IP
  3. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #23
    Say I set 14px for the content area (whatever em value that equals out to by then) It is impossible to make that 14px across all browsers on all systems, due to different browser defaults, DPI, and everything else. That's what I mean.
     
    rochow, May 26, 2008 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #24
    Which is why you should (almost) never set a pixel value for your content on a public-facing Web site (as much as I'd love to be accurately able to, mind you).
     
    Dan Schulz, May 26, 2008 IP
  5. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #25
    If you want it to be pixel-perfect, I do think a px value is a better way to go then a relative em. There are people out there who are insane about it being even 1px off (they zoomed in to measure stuff to bitch that it was 1px off ... you can't even see it unless zoomed in 800%... but thats another story!)
     
    rochow, May 26, 2008 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #26
    Which is the point where I usually proceed to shove my boot up thier back-sides and tell them tha the USER has to come first, not their own over-inflated egos. Not everyone can read 9px text (phpBB developers, I'm looking at you) or even 14px text. Sometimes people NEED to be able to zoom in, and since not all browsers have page-zooming features (like Opera) or do it poorly (IE 7 I'm looking at you) you just can't rely on a pixel perfect layout.

    Just to put things into perspective, my last eye exam showed that my vision was -550 in each eye, plus I had also developed astigmatism. I'm about ready to schedule my next check-up (I feel my vision's gotten worse since then because I'm now having to zoom in using Opera's Page Zoom technology in order to read the text on more and more sites) as it is, so if you care one iota about accessibility, you'd be using a relative font size such as EM anyway.

    And the age-old excuse of making text "big enough to read in the first f***ing place" just doesn't hold water because what may be a good text size for you may be too big or too small for the next person, depending on their own ability to see clearly, the monitor they're using, their computer's settings, and so forth.
     
    Dan Schulz, May 26, 2008 IP
  7. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #27
    Exactly. I use 86% em most of the time, but still its too small for some people (such as my grandparents) They always have trouble reading emails unless they get their glasses, and still they like to get nice and close to the screen if its a retarded font or colour (its not just websites that this stuff matters in)
     
    rochow, May 26, 2008 IP
    Dan Schulz likes this.