CSS Menu Lists Problem

Discussion in 'HTML' started by Chris Leonard, Oct 26, 2003.

  1. Can anyone please tell me why my list is still "bullet pointed" ?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE>Chris's CSS Menu Builder</TITLE>
    <style type="text/css">

    body
    {
    background-image: url(bg.gif);
    }

    ..nav
    {
    width: 140px;
    float: left;
    margin: 0;
    }

    ..menuheading
    {
    font-weight: bold;
    }

    ..intro
    {
    margin-left: 160px;
    }

    ..nav, .intro
    {
    margin-top: 5px;
    }

    ..nav ul
    {
    list-style: none; <<<---- I thought this line would turn off bullet points
    !!
    margin: 0;
    padding: 0;
    border: none;
    }

    ..nav li
    {
    border-bottom: 1px solid #C48532;
    margin: 0;
    }

    ..menuheading
    {
    font-size: 90%;
    display: block;
    padding: 2px 2px 2px 0.5em;
    background-color: #C48532;
    color: #000000;
    font-weight: bold;
    text-decoration: none;
    width: 100%;
    }

    ..nav li a
    {
    font-size: 90%;
    display: block;
    padding: 2px 2px 2px 0.5em;
    border-left: 1px solid #C48532;
    border-right: 1px solid #C48532;
    border-top: 1px solid #C48532;
    border-bottom: 1px solid #C48532;
    background-color: #C48532;
    color: #000000;
    text-decoration: none;
    width: 100%;
    }

    html>body .nav li a
    {
    width: auto;
    }

    ..nav li a:hover
    {
    border-left: 1px solid #000000;
    border-right: 1px solid #000000;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    background-color: #FFFFCC;
    color: #000000;
    }
    </style>
    </head>

    <BODY>
    <UL class="nav">
    <LI class=menuheading>Menu Heading
    <LI><A href="#">First
    Item</A>
    <LI><A href="#">Second
    Item</A> </LI>
    <LI class=menuheading>Sub Heading
    <LI><A href="#">First
    Sub Item</A>
    <LI><A href="#">Second
    Sub Item</A> </LI>
    </UL>

    <DIV class=intro>
    <H3>CSS Menu Builder</H3>

    </BODY>
    </HTML>
     
    Chris Leonard, Oct 26, 2003
    #1
    1. Advertising

  2. Chris Leonard wrote:

    > .nav ul
    > {
    > list-style: none; <<<---- I thought this line would turn off bullet


    That is a descendent selector. It applies to a <ul> element inside any
    element with class="nav".

    > <UL class="nav">


    This <ul> is not inside something with class="nav", it has class="nav".

    Try ul.nav {}

    --
    David Dorward http://dorward.me.uk/
     
    David Dorward, Oct 26, 2003
    #2
    1. Advertising

  3. Brilliant! Thanks David, you're a star!
     
    Chris Leonard, Oct 27, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JustSomeGuy

    Sorting lists of lists...

    JustSomeGuy, Jun 17, 2004, in forum: C++
    Replies:
    0
    Views:
    338
    JustSomeGuy
    Jun 17, 2004
  2. Jon Slaughter

    lists of lists

    Jon Slaughter, Dec 13, 2004, in forum: C++
    Replies:
    4
    Views:
    442
    Buster
    Dec 13, 2004
  3. Charlotte Henkle

    Counter for items in lists in lists?

    Charlotte Henkle, Sep 25, 2004, in forum: Python
    Replies:
    8
    Views:
    414
    Charlotte Henkle
    Sep 26, 2004
  4. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    431
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  5. Replies:
    1
    Views:
    233
    Randy Webb
    Feb 19, 2006
Loading...

Share This Page