Jump to content
dstarz

Unordered list in Ordered list

Recommended Posts

Hello, I tried search and google but it didn't make me wiser.

  1. Can i get an unordered list in an ordered list?

I tried it like this

<ol><li></li><li></li><ul><li></li><li></li><li></li></ul></ol>

This didn't work for me, so my question is, what am i doing wrong? Or is this not possible like this? 2. Or does someone know how to make them like 1.1, 1.2 1.3, 2, 2.1 etc. I'm new at XHTML/css and i want to do it the right way.Tx in advance.

Share this post


Link to post
Share on other sites

Ok Sorry for the question, I have the answer. It was my CSS that was interfering with the lists.So it works like I explained in example 1.

Share this post


Link to post
Share on other sites

I'd put the UL in one of the OL's list tags, but other than that it works.

Share this post


Link to post
Share on other sites

In order to be valid, the <ul> tag has to be inside one of the <li> tags of the other list

<ol>    <li>	    <ul>		    <li></li>		    <li></li>	    </ul>    </li>    <li></li>    <li></li></ol>

To my knowledge, automatic numbering as 1.2, 1.3, 2.1... is not possible with HTML and CSS.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...