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
  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    San Francisco
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    line-height and browser variance

    Any tricks to dealing with browser variance of line-height for blocks (paragraphs) of text? I'm using line-height of 1.7, and getting (slight) differences across browsers. Unavoidable?

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    It depends a little. Some antialiasing systems, such as the OS wide one in Mac OS X, allow less-than-whole pixels in all directions. Some browsers (read Opera) account for a font's aspect value. Some need manual setting using font-size-adjust. And don't believe fonts use the same aspect value just because they are named the same. Mac vs. PC Verdana is a prime example. Add on top of that rounding and general rendering differences.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    San Francisco
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For example, I have a paragraph of text that matches to-the-pixel in IE/Opera, using line-height of 1.7. To match those with NN, I need to set NN's line-height to 1.64.

    (All browsers latest versions, Windows.)

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I run into that problem a bunch because my computer is a Mac... when I look at the design in a PC it (font, font-size, line-height, etc.) takes on a whole other look.

    I find it's easier just to make sure the layout isn't dependent on that sort of thing, and I use images for the more decorative text (a no-no, I'm sure, but what the heck... )


  •  

    Posting Permissions

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