View Full Version : CSS Classes


Coconut99
08-04-2003, 10:31 PM
Why won't this work?! I'm really confused.
styles.css:

A:link{color:#FFCC00;background-color:#990000}
A:visited{color:#FFCC00;background-color:#990000}
A:active{color:#FFCC00;background-color:#990000}
A:hover{color:#FFCC00;background-color:#990000}

body{
margin:0;
font-family:Verdana;
font-size:11px;
}

.menu { color:#FFFFFF; }
.content { color:#000000; }

index.html:

<table>
<tr>
<td class="menu">MENU</td>
<td class="content">CONTENT</td>
<td class="menu">MENU</td>
</tr>
</table>

(Everything works except for the classes.) Thanks in advance!

amicus
08-04-2003, 10:59 PM
try this :). just put the 'td' in front of what you had.

td.menu { color:#FFFFFF; }
td.content { color:#000000; }

Coconut99
08-04-2003, 11:47 PM
Hmmmm... Didn't work. Thanks anyway, though!

pb&j
08-05-2003, 12:01 AM
can you post a link to the page in question? perhaps there is a different thing affecting it.

Coconut99
08-05-2003, 02:54 PM
Okay, here's the URL: http://www.laughingotter.net/sneakoscope/. Would it matter that the part of the page that isn't working is a PHP include? (The include *is* working, but not the CSS.) I didn't think so, but that could be the problem.

Coconut99
08-05-2003, 03:23 PM
::sighs:: I've changed everything around that I think could possibly make a difference and nothing helps, so I think I'm going back to tried and true HTML for the time being. Thanks anyway, though!

pb&j
08-05-2003, 09:45 PM
i do not see the classes in your css page and i do not see any class reference in your page coding.

do you have a test page elsewhere that you are trying this on so we can see the problem in action?