SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jan 2009
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    reset.css - font size

    Hi all

    I'm using a reset.css page to reset values across browser.

    If I reset the font size
    Code:
    font-size: 100%;
    Will I start off with the same font size in all browsers, if I do what's that size in pixels

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    If you set font-size:100% you are changing nothing because the font-size will be whatever the browser or user has set the font-size to. You can never know what that is.

    The reason for using font-size:100% is usually to combat the scale bug in IE where text resizes at a strange rate unless the font-size is specified in percent for the root element.

    Most browsers will probably default to 16px but there are just too many variables to be sure. In reality you shouldn't concern yourself with that anyway and you should make your layout work in whatever the user throws at it (easier said than done of course).

    If you want a specific size (and ignoring accessibility issues) then you would need to set it in pixel measurements but even then the user may have set the browsers to ignore font sizes (colours and families) in their preferences or in their user stylesheets so you can never be certain.

    As you don't really have any control then you should abandon control to the user and design accordingly

  3. #3
    SitePoint Addict
    Join Date
    Jan 2009
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paul O'B, Thanks for your reply


Bookmarks

Posting Permissions

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