Css for indicating current page

this is the first time i’ve cascaded this deep. i thought i had this working, but it all disappeared when i added another li to my ul.

(note: before the hex police descend upon me, i use color names for testing because it is easier to look for the word green than it is to wade through hex codes.)

CSS:

.about .navlist .about a,
{color:green; background-color: white;}

HTML:

<div id="footer" class="about">
<!-- #BeginLibraryItem "/Library/newNav-footerNav.lbi" -->
<div id="footerNav">
<ul class="navlist">
<li class="about"><a href="#nogo">About/Home</a></li>
</ul> <!-- end navList -->
</div> <!-- end footerNav -->
<!-- #EndLibraryItem -->
</div> <!-- end footer -->

anyone care to tell me what obvious thing am i missing?

thanks!

michelle :slight_smile:

(p.s. i’m using dreamweaver, hence the library item lines)

ok, that is SO weird…

if i put them all in a long single-line list like so:

.print .navlist .print a, .web .navlist .web a, .motion .navlist .motion a, .about .navlist .about a, .rates .navlist .rates a, .cases .navlist .cases a

rather than one item per line like so:

.print .navlist .print a, 
.web .navlist .web a, 
.motion .navlist .motion a, 
.about .navlist .about a, 
.rates .navlist .rates a, 
.cases .navlist .cases a

they work!?!

Shouldn’t make any difference. The only thing that might be tripping it up if you’re using multiple lines is if you’ve got a comma at the end of the last line before the {, which stops it from working.

nope, no ending comma. and i checked for it specifically 'cause i had just figured that one out earlier in the same learning curve session.

You might have hidden characters somewhere in the CSS file and the carriage return or line feed could be the culprit. Shove it through the ‘W3C CSS Validator’ and see if it spots something wrong somewhere else on the CSS file.

i did that, too. came back clean as a whistle.

Well, from those examples I cannot see any problem and it works for me both ways. So Maybe you have a fault somewhere in the markup or have a mismatched class name elsewhere.

We’ll have to see the rest of the markup because I see green links. I assume you are viewing the page via a web browser and not a preview pane, etc.

thanks everyone, for your help. just to clarify, i did get it to work only i had to put everything in one long line.