Click to See Complete Forum and Search --> : CLASS vs ID


stmasi
07-03-2003, 09:54 AM
Working on link attributes using CSS.

Here's what I have:

HTML
<a class="nav" href="uri/path/file.htm">Link #1</a>

CSS
nav:link { background-color: #ffffff; color: #000000; text-decoration: none; }

nav:visited { background-color: #ffffff; color: #000000; text-decoration: none; }

nav:active { background-color: #ffffff; color: #000000; text-decoration: none; }

nav:hover { background-color: #000000; color: #ffffff; text-decoration: none; }

It doesn't work. Am I missing something? Should I be using the # symbol in place of the : or what?

Looking for proper syntax.

Thanx.

Robert Wellock
07-03-2003, 09:58 AM
.nav place the . before the class name within the CSS file. # is for id.

stmasi
07-03-2003, 10:03 AM
Thank you!!!

:D