Style sheet problem.

This is a discussion on Style sheet problem. within the Tech Board forums, part of the Community Boards category; I have an html <dl> list, where each list item is a second <dl>. What I want is for the ...

  1. #1
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831

    Style sheet problem.

    I have an html <dl> list, where each list item is a second <dl>. What I want is for the outer <dl> to use a .gif as it's list-style-image, and the inner to have list-style: none. So I set up two different class identifiers in my .css file and applied them to the lists, however, the inner <dl> is also displaying the .gif. I assume the outer <dl> is cascading onto the inner, despite specifically being assigned to a different class.

    Is there a way round this?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Here's a sample using LI tags, controlling the type of bullet markers used. I guess DL tags have a similar control(?)

    Code:
    <html>
    <head>
    <title>Blah</title>
    <style type="text/css">
    ul.square  { list-style-type:square; }
    ul.decimal { list-style-type:decimal;}
    ul.none    { list-style-type:none;   }
    </style>
    </head>
    <body>
    <ul class=square>
      <li>Item one</li>
        <ul class=decimal>
          <li>Sub Item</li>
          <li>Sub Item</li>
        </ul>
      <li>Item two</li>
        <ul class=none>
          <li>Sub Item</li>
          <li>Sub Item</li>
        </ul>
    </ul>
    </body>
    </html>
    If this doesn't help, post some of your HTML and CSS.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  2. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  3. Need testers for editor
    By VirtualAce in forum Game Programming
    Replies: 43
    Last Post: 07-10-2006, 08:00 AM
  4. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  5. Replies: 5
    Last Post: 11-07-2005, 10:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21