General discussion

Locked

Line spacing in numbering

By laman ·
I want to know if there is any way to define the line spacing, or a extra blank line between two lines in numbering, apart from adding <p></p> in front of the <li> manual. Preferably, the solution will work under bot the IE and NS. Thanks.

Antonio

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

CSS!

by dtds In reply to Line spacing in numbering

You could use a CSS style like this:

li {
font-size: 12px;
margin-bottom: 12px;
}

Other properties like line-height will work fine too.

Collapse -

CSS, Yes!

by techrepublic In reply to CSS!

I recommend:

li
{
padding-top: 1em;
}

Which will give spacing the size of the capital "M" regardless of font size. There's
already padding at the bottom of the last element.

Also, this will work for both IE and Mozilla, although I've never tested it on Opera. Margins in list item elements generally don't render well in IE.

(I also recommend the BSD brace style, as opposed
to the K&R (aka OTB) brace style, but that's another discussion entirely!)

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums