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 4 of 4

Thread: CSS Font Size?

  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    126
    Thanks
    4
    Thanked 0 Times in 0 Posts

    CSS Font Size?

    What is the best way to apply font size in CSS. I'm still using '10px'

    I've started seeing 65%, 1.5em and even 65%/1.5em

    when would i use this? and what are the values for 10px/12px

  • #2
    New Coder
    Join Date
    May 2010
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Percentage is the cheapest way to set the font size. Font size always recommended to give in px or em.

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    I set a base font size at 1.0 em and then use percents for the rest. Of course, IE is going to need some tweaking.

    Care With Font Size: http://www.w3.org/QA/Tips/font-size
    ☠ ☠RON☠ ☠

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    Quote Originally Posted by forcerhpool View Post
    when would i use this? and what are the values for 10px/12px
    The value before the slash is the font size, the value after the slash is the line height. But this only applies if you use the shortcut writing, e. g. font: italic 10px/12px Arial, Helvetica, Sans-serif;


  •  

    Posting Permissions

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