Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2008, 07:21 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default How do you make a sublist?

Hi

I have this code

Code:
 <ol class="HomeList">
            <li>New Website Design.</li>
            <li>"FlashCard Practice Quiz page" completely redone.</li>
            [list]
                    <li>Selection of quiz items now done in javascript.</li>
                    <li>Quiz game is now done in  javascript</li>
            </ul>
            <li>Removed use of Asp.net Ajax.</li>
            <li>"Contact Us page" completely redone.</li>
       </ol>
but I get this warning

Warning 1 Validation (XHTML 1.0 Transitional): Element 'ul' cannot be nested within element 'ol'. I:\Jap-Version\InterActiveJapanese.com-V3.1.1\InterActiveJapanese.com\Home.aspx 19 14 I:\...\InterActiveJapanese.com

How do I do a sublist of my items then?

 
Old July 5th, 2008, 07:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

OL (and UL) can only directly contain LI. So you have to nest the sublist inside a LI.

Code:
<ol>
  <li>...</li>
  <li>...</li>
  <li>
    [list]
      <li>...</li>
      <li>...</li>
    </ul>
  </li>
</ol>
--
http://yupapa.com
 
Old July 15th, 2008, 02:45 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

don't feel bad, I didn't use sublists for awhile until someone was able to explain this too me. Meow is perfect. Your list needs to be inside the list item to be a "sublist", opening <li> blah then the entire HTML for the sublist and only THEN do you close the list item </li>. Good luck!

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old July 15th, 2008, 11:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:Meow is perfect.
Why thank you! I though I myself was the only one who realized that.:D

--
http://yupapa.com
 
Old July 15th, 2008, 04:20 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Thanks... I can't believe how picky those list tags are lol.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Make 2 or 1 Muhammad Zeeshan SQL Server 2000 2 August 16th, 2007 01:10 PM
Can someone make this? JonathanRay C# 4 February 16th, 2007 08:57 AM
Can someone make this? JonathanRay C++ Programming 0 February 5th, 2007 10:40 PM
How can I make that? kalchev ASP.NET 2.0 Professional 0 April 3rd, 2006 07:01 AM
Make Call babur Visual C++ 0 April 4th, 2004 03:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.