Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS Menu Lists Problem

Reply
Thread Tools

CSS Menu Lists Problem

 
 
Chris Leonard
Guest
Posts: n/a
 
      10-26-2003
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>


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      10-26-2003
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/
 
Reply With Quote
 
 
 
 
Chris Leonard
Guest
Posts: n/a
 
      10-27-2003
Brilliant! Thanks David, you're a star!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of lists of lists of lists... =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==?= Python 5 05-15-2006 11:47 AM
CSS MENU and CSS photo gallery desjardins.daniel@gmail.com Javascript 1 02-19-2006 06:22 PM
lists of lists Jon Slaughter C++ 4 12-13-2004 06:28 PM
Lists of Lists VWWall Computer Information 2 10-21-2004 01:15 AM
Sorting lists of lists... JustSomeGuy C++ 0 06-17-2004 05:44 PM



Advertisments