SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Jul 2002
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Specify different font size for Windows?

    I am programming a site that uses Georgia for the main body copy. On the Mac, which features very nice font-smoothing (anti-aliasing), the type looks perfect at 12px, and too small at 11px. On Windows, which doesn't feature very nice font-smoothing (or very nice anything else, for that matter), the type looks too large at 12px, and perfect at 11px.
    Is there a way to specify 12px for Mac and 11px for Windows? (I tried modifying the box-model hack for this purpose, but didn't have any luck.)

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

    Use the mac hiding hack to hide styles for iemac:

    Code:
    body {font-size:12px}
    /* mac hide \*/
    body {font-size:11px}
    /* end hide - do not remove these comments or the first ones as they are the hiding hack*/
    I should point out that pixel font-sizes are not ideal for ie because the user is unable to resize them. You really should use percentages /ems instead

  3. #3
    SitePoint Addict
    Join Date
    Jul 2002
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm ... that's not working, Paul. Font is showing up at 11px in Safari, Mac FF and Camino ... ?

    Thanks for the suggestion on the percentages/ems. I'll switch up once I get this part figured out. (Though, I must admit, I always feel like I'm walking on shaky ground when I use percentages/ems instead of px. Guess I just need to do so more often to get used to it.)

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

    Sorry i wasn't thinking That only works for ie on the mac.

    I don't think theres anything you can do for other browsers on the mac as there is no way to distinguish them from the pc.

    Theres a list of filters here but as you can see there is nothing that sets all browsers on the mac apart.

    http://centricle.com/ref/css/filters/

    You may need to try a different font.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use a combination of Paul's suggestion and the Tan hack:
    Code:
    body {font-size:12px}
    /* Start IE/Mac hide \*/
    * html body {font-size:11px}
    /* End IE/Mac hide */
    Of course this only targets Internet Explorer for Windows, but I don't think there's a hack or filter available that filters only on operating system.

    And using pixel-sized fonts is a very bad idea, especially for IE.
    Birnam wood is come to Dunsinane


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
  •