Jump to content


Photo

nested lists


  • Please log in to reply
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 October 2006 - 05:33 PM

I was wondering, with xhtml, I was trying to use nested lists, to get a different affect.
Like
<ul>
<li>Master Category</li>
  <ul>
  <li>Sub 1</li>
  <li>Sub 2</li>
  <li>Sub 3</li>
  </ul>
<li>Master Category 2</li>
  <ul>
  <li>Sub 1</li>
  <li>Sub 2</li>
  <li>Sub 3</li>
  <li>Sub 4</li>
  </ul>
<li>Master Category 3</li>
  <ul>
  <li>Sub 1</li>
  <li>Sub 2</li>
  </ul>
</ul>
When I do this however I get validation errors, but this is a good way to make it seem like i have category subcategory setup, why the validation errors?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 20 October 2006 - 05:43 PM

try placing your internal <ul> tags within your <li>:
<ul>
  <li>Master Category 3
    <ul>
      <li>Sub 1</li>
      <li>Sub 2</li>
    </ul>
  </li>
</ul>
to be perfectly honest, i don't know if it will help validation since i don't have a good way to check right this minute, but try it and see ;)
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 KevinM1

KevinM1
  • Moderators
  • Snarkimus Prime
  • 5,248 posts

Posted 20 October 2006 - 05:53 PM

try placing your internal <ul> tags within your <li>:

<ul>
  <li>Master Category 3
    <ul>
      <li>Sub 1</li>
      <li>Sub 2</li>
    </ul>
  </li>
</ul>
to be perfectly honest, i don't know if it will help validation since i don't have a good way to check right this minute, but try it and see ;)


Doing it this way should validate.  I use the same structure on my French site's flyout menus, and it validates as XHTML Strict.
Using 'global' is a sign of doing it wrong

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 October 2006 - 05:56 PM

That'll work, that helped, thanks.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users