Subject: [css-d] lists line height

From: gleemax at attbi.com (John Lewis)
Date: Thu, 24 Apr 2003 23:22:54 -0500

Brandy wrote on Tuesday, April 22, 2003 at 7:47:37 PM:

> http://clients.mediadiva.net/css/

> The links on the left bottom side, I have the line height set to
> 120, and I like how it looks, but I thought it was possible to set
> the height between each LI element and then the height of an
> individual LI element itself. This way links the run over to 2 lines
> will look like 1 link and not 2 links.

> Anyone know what I am talking about?

Yes. Although it took me a while to understand. :) If you want to
retain the line-height but have the links' background-color remain
"together" over multiple lines, I think you'll need to use padding-top
and padding-bottom on the a elements. For example:

    ul li a{padding:.2em 0}

Should do the trick. You may also consider this, depending on your
needs, but I doubt it will be more appropriate:

    ul>li a{padding:.2em 0}

Support isn't as good, at any rate.

-- 
John Lewis