How to Change Line-Spacing ?

Discussion in 'HTML' started by Talal Itani, Mar 28, 2007.

  1. Talal Itani

    Talal Itani Guest

    Hello,

    Some web sites have text line-spacing different from the default. Maybe one
    and a half lines. How do they do that? Thanks.

    T.I.
    Talal Itani, Mar 28, 2007
    #1
    1. Advertising

  2. Talal Itani

    Guest

    On Mar 28, 5:58 pm, "Talal Itani" <> wrote:
    > Hello,
    >
    > Some web sites have text line-spacing different from the default. Maybe one
    > and a half lines. How do they do that? Thanks.
    >
    > T.I.



    You can try

    CSS line-height property
    (line-height: 1cm;)

    if looking for some more information ,
    i am sure googling will definetly help you.
    , Mar 28, 2007
    #2
    1. Advertising

  3. Scripsit Talal Itani:

    > Some web sites have text line-spacing different from the default. Maybe
    > one and a half lines. How do they do that? Thanks.


    They might do it some wrong way, but the simple way is

    * { line-height: 1.5; }

    in CSS. It's a good idea, because setting line-height magically protects
    against some nasty browser bugs (Peekaboo bugs), in addition to fixing the
    common problem that default line-height is too small for most fonts that
    authors use on web pages, when lines can be fairly long.

    The value of 1.5 is fairly large, though; usually 1.3 or 1.35 is sufficient.
    It may _look_ like "one and a half lines", since e.g. 1.3 means 1.3 times
    the font size, and the font size is normally larger than what people may see
    as the height of the letters, since it means (roughly speaking) the distance
    from the bottom of the lowest descender up to the top of the highest
    ascender plus often a little extra spacing.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 28, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Geoff Hague
    Replies:
    4
    Views:
    444
  2. David Smithz

    CSS line spacing

    David Smithz, Mar 2, 2006, in forum: HTML
    Replies:
    7
    Views:
    102,543
    Jonathan N. Little
    Mar 5, 2006
  3. Chris “Kwpolska†Warrick

    Re: change spacing to two instead of four with pep8 or flake8?

    Chris “Kwpolska†Warrick, Apr 8, 2014, in forum: Python
    Replies:
    0
    Views:
    56
    Chris “Kwpolska†Warrick
    Apr 8, 2014
  4. Tim Chase
    Replies:
    0
    Views:
    45
    Tim Chase
    Apr 8, 2014
  5. Peter Otten
    Replies:
    2
    Views:
    48
    Peter Otten
    Apr 8, 2014
Loading...

Share This Page