Forum Moderators: not2easy

Message Too Old, No Replies

Inserting line breaks between items in a numbered lists

Can this be acheived using CSS?

         

StepOne

11:08 am on Aug 12, 2005 (gmt 0)

10+ Year Member



Hi,

I'm using a numbered list and would like a one line gap between the items on the list. I've been using a rather untidy work-around by placing two breaks before the closing </li> which does seem to work but may not be valid HTML. Is there a more elegant way using CSS? I've searched but have been unable to come up with a better solution.
BTW. each numbered item often comprises more than one line.

This is what I have been using:
<ol style="list-style-position:outside;">
<li>This is item one><br /><br /></li>

<li>This is item two><br /><br /></li>
</ol>

Many thanks.

birdbrain

1:15 pm on Aug 12, 2005 (gmt 0)



Hi there StepOne,

how about like this...


<style type="text/css">
<!--
ol {
list-style-position:outside;
}
li {
margin-bottom:25px;
}
-->
</style>
<ol>
<li>This is item one</li>
<li>This is item two</li>
<li>This is item three</li>
</ol>

birdbrain

StepOne

9:12 pm on Aug 12, 2005 (gmt 0)

10+ Year Member



Hi birdbrain,

What can I say except, many thanks - it works like a charm. As you can tell I'm a beginner at this sort of thing and appreciate you taking the time to answer my post.

Thanks again,

StepOne

birdbrain

3:07 am on Aug 13, 2005 (gmt 0)



No problem, you're welcome. ;)