Thread:Project:Support desk/How to create nested definition lists?/reply (7)

So a nested definition list must be inside a description. To do this you must precede the nested definition list with a description. If you want to continue the list at main level it is apparently necessary that the nested list is followed by another description.
 * term 1: description of term 1
 * term 2:(empty) description
 * term 2-1: description of term 2-1
 * term 2-2: description of term 2-2
 * (empty) description


 * term 3
 * description of term 3

I would like to use this and give the nested list a different layout by using a class defined in common.css. So I thought I do it like this:
 * term 1: description of term 1
 * term 2:
 * term 2-1: description of term 2-1
 * term 2-2: description of term 2-2
 * term 3
 * description of term 3
 * description of term 3

However it seems parsing goes wrong when you include a div or other block element like this. Strangely it produces good code I you add a colon for term 3 and description 3:
 * term 1: description of term 1
 * term 2:
 * term 2-1: description of term 2-1
 * term 2-2: description of term 2-2
 * term 3
 * description of term 3

This is of course not a workable solution. Another thing that works is using span instead of div. Of course a definition list (block element) shouldn't be in a span (inline element). This nasty solution works:
 * term 1: description of term 1
 * term 2:
 * term 2-1: description of term 2-1
 * term 2-2: description of term 2-2
 * term 3
 * description of term 3
 * description of term 3

It would be nice if MediaWiki could be improved to support the use of div in this case.