Forum Moderators: open

Message Too Old, No Replies

How to style nested lists

How do I style a nested list?

         

amythepoet

12:22 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HI,

I've got a statement like this:

li><a href="abluewidget.html">A Blue Widget</a><br> -"I'm so glad I bought this blue widget, it's great"</li>
<li><a href="agreenwidget.html">A Green Widget</a><br> - "What an amazing green widget, thanks!"</li>

The problem is I'm using a <br> code in the middle and keep getting a validation error, should I make this into a nested list?

I don't really think I need a nested list, but something to differentiate the text from the testimonial

BlobFisk

12:34 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try <br />.

However, looking at what you are trying to do, how about using a Definition List [w3.org]?

amythepoet

12:58 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, thanks, I will try out the defintion list and will let you know how I do.

amythepoet

1:51 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, the definition list worked great,

Now, the problem is that I would like to an one line after the definition and before the next item on the list.

How is that accomplished please?

choster

3:30 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would like to an one line after the definition and before the next item on the list.

For

<dl>
<dt><a href="abluewidget.html">A Blue Widget</a></dt>
<dd>"I'm so glad I bought this blue widget, it's great"</dd>
<dt><a href="agreenwidget.html">A Green Widget</a></dt>
<dd>"What an amazing green widget, thanks!"</dd>
</dl>

try in your stylesheet

dt {margin-top:1em}