www.webdeveloper.com
Results 1 to 9 of 9

Thread: how big is 1em ?

  1. #1
    Join Date
    Nov 2004
    Location
    xxxyyy
    Posts
    357

    how big is 1em ?

    I have two doubts

    Q1: how big is 1em ? is it bigger than 1px ?

    Q2: Also, when we write font:80%/1 sans-serif; in css , what does this mean ? what is 80% here ?

  2. #2
    Join Date
    Dec 2010
    Posts
    12
    em is relative unit of measure. It depends on browser's default font size (usually it is 16px), so it's bigger than 1px! And the answer for your second question is the same - % depends on browser's default font size.

  3. #3
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654

  4. #4
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217

  5. #5
    Join Date
    Dec 2005
    Posts
    2,984
    That'd be right, Major Payne, if there was no other modifications done to the font size on the page higher up in the cascade. You can't compare a relative unit to a fixed unit. That's like saying: how much is a full glass of water?

    Full = 100% = 12oz = 354mL

    ....depends on the size of the glass now doesn't it?

  6. #6
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    Nice article on it: http://clagnut.com/blog/348/

  7. #7
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217
    Quote Originally Posted by aj_nsc View Post
    That'd be right, Major Payne, if there was no other modifications done to the font size on the page higher up in the cascade. You can't compare a relative unit to a fixed unit. That's like saying: how much is a full glass of water?

    Full = 100% = 12oz = 354mL

    ....depends on the size of the glass now doesn't it?
    Did I not say, "Approximate Conversion from Points to Pixels"?

  8. #8
    Join Date
    Dec 2010
    Posts
    12
    It's clear what is em, but I wonder what kind of measurement is better to use for font-size? Relative or absolute? And which are you using?

  9. #9
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217
    Care With Font Size: http://www.w3.org/QA/Tips/font-size

    Related:

    Choosing Dimensions for Your Web Page Layout:

    http://www.elated.com/articles/choos...b-page-layout/
    How to create flexible sites quickly using standards like CSS and XHTML: http://www.ibm.com/developerworks/web/library/wa-rapid/
    In Search of the Holy Grail: http://www.alistapart.com/articles/holygrail/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles