E-mail List Archives
Re: Using UL for links
From: Jukka K. Korpela
Date: Mar 16, 2004 9:49PM
- Next message: Michael D. Roush: "Re: Using UL for links"
- Previous message: Leesa Lavigne: "Using UL for links"
- Next message in Thread: Michael D. Roush: "Re: Using UL for links"
- Previous message in Thread: Leesa Lavigne: "Using UL for links"
- View all messages in this Thread
On Tue, 16 Mar 2004, Leesa Lavigne wrote:
> I just tried using the UL for side links and like it except for one
> thing that you might be able to help me with. I would like more vertical
> spacing between each link. I couldn't find a CSS attribute that worked just
> between the line items and not between every line (incase one link wrapped
> to two lines).
You can use margin properties, e.g.
ul li { margin-bottom: 0.5em; }
Note that this adds a margin below the last item too, so you might wish to
set margin-bottom: 0 for it.
> Any suggestions? I did try putting a break tag right before each /LI
> tag but that didn't work.
The <br> tag means 'line break', and browsers have different
interpretations of what this means in different context. For a list item,
which itself implies line breaks before and after (by default), the
natural interpretation is that <br> before </li> has no effect.
People have often used <p> before </li>, which means using an empty
paragraph, but this is clumsy and coarse, has unpredictable effects in
general, and is explicitly frowned upon in HTML specifications.
So it's much better to use CSS.
--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/
- Next message: Michael D. Roush: "Re: Using UL for links"
- Previous message: Leesa Lavigne: "Using UL for links"
- Next message in Thread: Michael D. Roush: "Re: Using UL for links"
- Previous message in Thread: Leesa Lavigne: "Using UL for links"
- View all messages in this Thread