Cronthenoob Posted August 4, 2006 Share Posted August 4, 2006 I've got something like this : <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul></ul> The HTML validator doesnt like lists inside lists i guess. Is there an easy way to fix this?It displays the page the way i want it to, but it probably isn't the best way to accomplish this. Link to comment Share on other sites More sharing options...
boen_robot Posted August 4, 2006 Share Posted August 4, 2006 Enclose the nested <ul> in a list item, like this: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul> Or better yet, enclose it as a child of the third item to which it belongs to anyway: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3 <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul> Link to comment Share on other sites More sharing options...
Cronthenoob Posted August 4, 2006 Author Share Posted August 4, 2006 Thanks a bunch!That was quite simple. I always seem to be ignorant to the small things.I wish i would have known to do that before i made that huge list, that was a pain to fix Link to comment Share on other sites More sharing options...
justsomeguy Posted August 5, 2006 Share Posted August 5, 2006 I ran into this too. If you want or need to use this method: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul> but don't want the extra bullet to appear for the nested list, you can use CSS to hide it: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li style="list-style-type: none;"> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now