SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict frankiehots's Avatar
    Join Date
    Jan 2002
    Location
    U.S.A. *Blue State*
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Overlapping Text When Using CSS Line-Height

    I am having a problem with large text overlapping when I use the CSS line hieght tag. The small text looks just fine. Does anyone know a fix for this?

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by frankiehots
    I am having a problem with large text overlapping when I use the CSS line hieght tag. The small text looks just fine. Does anyone know a fix for this?
    Use a numerical value for the line-height property:
    Code:
    body {
     line-height: 1.3;
    }
    Specifying a percentage (e.g. 130%) or a length in units (e.g. 1.3em) will produce identical results for the element to which it is applied, but child elements will inherit the actual computed line height from the element as opposed to the proportion of font size. Specifying a value as a pure number causes children to inherit the actual ratio.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Babys got backa hard back, that is: The Ultimate CSS Reference


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
  •