Welcome, Guest
  • Author Topic: Multiple <li> styles in one <ul>?  (Read 3382 times)

    rathurosamal

    • Server what's that
    • *
    • Posts: 2
      • View Profile
      • Email
    Multiple <li> styles in one <ul>?
    « on: 07/22/09, 23:42 »
    Hello,

    I have been stumped working on this issue for about 2 days now, but havent been able to jump this hurdle:

    transeca.com

    My navigation is dynamically created in a loop:

    <ul id="glossymenu">
    <li>Category</li>
    <li>sub category</li>
    <li>sub category</li>
    <li>Category</li>
    <li>sub category</li>
    </ul>

    If you visit the page, the first <li> is 'Pet GPS' , this is a top level category. The next top level category is all the way at the bottom called 'Test'.

    Basically Im trying to assign 2 different styles a 'Category' and 'sub category', my attempt at this is using an id on only the top level <li>'s:

    <ul id="glossymenu">
    <li id="maincat">Category</li>
    <li>sub category</li>
    <li>sub category</li>
    <li id="maincat">Category</li>
    <li>sub category</li>
    </ul>

    But I dont seem to be able to override the style in this manor:

    #maincat li a{
    background:#000000;
    }

    My stylesheet:
    transeca.com/css/style.css

    Any advice is deeply appreciated!

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Multiple <li> styles in one <ul>?
    « Reply #1 on: 07/23/09, 01:57 »
    If I caught your thought, you mean soemthing like this:

    Code: [Select]

    <ul>
       <li>
         <ul>
            <li>Entry1</li>
            <li>entry2</li>
         </ul>
      </li>
      <li> ....
    </ul>
    happy flashing
    8)
    Ronald