Page 1 of 1
Link colors
Posted: Wed May 26, 2004 3:25 pm
by [n00b]
I use CSS to change how the links look (when mouse over etc.)
However this applies to the whole page. How can I do that to each link or to all links in a table cell separately?
Posted: Wed May 26, 2004 3:40 pm
by Draco_03
for exemple you create that in your css
Code: Select all
a.smallmenu {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
text-decoration: none;
color: #7D85BD;
}
a:hover.smallmenu {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
text-decoration: none;
color: #3E498E;
}
and in your code you make
Code: Select all
<a href="home_fr.php" class="smallmenu">home</a>
you can create as many sub class as you want..
Posted: Thu May 27, 2004 4:06 pm
by [n00b]
how to apply this to a table cell or to a whole table?[/pg_man]
Posted: Sat May 29, 2004 8:05 am
by [n00b]
noone knows ?

Posted: Sat May 29, 2004 8:10 am
by kettle_drum
Find a website that does this and look at their code. It should just be the same .hover css, but applied to the <td> background instead of the link:
Code: Select all
.highlight.hover {
background: #FF1111;
}
<table>
<tr>
<td class="highlight">
Test
</td>
</tr>
</table>
Posted: Mon May 31, 2004 6:35 pm
by coreyb
Use
Code: Select all
table.tablename a
{
color: #FF0000;
}
table.tablename a:hover, a:visited
{
color : #0000FF;
}
This also goes for td.tdname or tr.trname. You should use them as per the following:
Code: Select all
<table width="500" border="0" cellspacing="0" cellpadding="5" class="tablename">
<tr>
<td><a href="#">link</a></td>
</tr>
</table>
If you use them in the <td> or <tr> elements place the class in the tag.
Good Luck!

Posted: Wed Jun 02, 2004 4:20 am
by [n00b]
coreyb wrote:Use
Code: Select all
table.tablename a
{
color: #FF0000;
}
table.tablename a:hover, a:visited
{
color : #0000FF;
}
This also goes for td.tdname or tr.trname. You should use them as per the following:
Code: Select all
<table width="500" border="0" cellspacing="0" cellpadding="5" class="tablename">
<tr>
<td><a href="#">link</a></td>
</tr>
</table>
If you use them in the <td> or <tr> elements place the class in the tag.
Good Luck!

thanks man!