[thelist] CSS Question Round 2

Hershel Robinson hershelr at netvision.net.il
Wed Jul 10 04:03:00 CDT 2002


I was given three possible solutions to my previous post, but in my tests on
IE6 (Win2K), none of them worked correctly.  They are:

> you could drop the line-height
>attribute all together, and just use padding (or margin) on the bottom (or
>top, i suppose) to accomplish the same thing.

>   margin-bottom: 5px; /*insert the appropriate amount of space here*/

>You could try setting display: block; and height: 2em;

This last one works, but it leaves an entire blank line between the links
(no matter what I set height: to be).  The other two didn't work for me at
all.  Perhaps I'm not implementing them correctly, but they didn't work for
me.

If anyone has any better ideas (perhaps ideas which were actually
implemented and tested), here is my original post (slightly modified with
other suggestions received):

I have a nav bar on the left of the page.  It looks like this:

...
  <a class="colmenu" href="">About us</a><br />
  <a class="colmenu" href="">Support<br />ThisOrg.org<br /></a>
  <a class="colmenu" href="">Something Else</a><br />
...

a.colmenu {
   line-height: 1.5;
   color: #330099;
   font-family: "Arial", "Helvetica", sans-serif;
   font-weight: bold;
   text-decoration: none;
}

This is working out very nicely, except that the one link which is two lines
(Support ThisOrg.org) doesn't look great because the line-height becomes 1.5
there also.  What I would like is for each link to be separated by a space
from the ones above and below it.  Those links which are two lines, however,
should not have that space between their own two lines.  While we're at it,
I would also like the second line of those links to be indented a bit.

Thanks,
Hershel




More information about the thelist mailing list