Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question which is the cleanest way of specifying the font-size's unit

    Can any1 guide me on which unit to be used for the font-size...like % , em ,px?
    and if %, why that only?
    if em , why that?.................

    please do help me on this..........

    thanks in advance.....

  • #2
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There's a fairly reasonable consensus on setting the overall font size by applying a percentage to the body element, with maybe the line hight specified within the same declaration i.e.

    body {font-size: 78%/1.2}

    ..then using em values to adjust font size on other elements further down the document tree.

    Kind regards,

    Gary


  •  

    Posting Permissions

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