Gareth John
Gareth John

Reputation: 11

Change 1 hyperlink mouse over colour not in css but html

I have my code at the moment....

<td> <a href="http://www.canvasbay.co.uk/pages.php?pID=5&CDpath=0">Get Started!</a></td> 

The colours for the hyperlinks are in a css stylesheet however i want this specific TD different so i use the following...

<td> <a style="color: #800000" href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>"><?php echo MENU_TEXT_HOME;?></a></td>  

This works for the colour, however how do i change the mouse over colour ?

I tried to make another entry into the stylesheet by copying the original and changing the letter but this didn't work, my original stylesheet is below...

CSS

 a { 
      color: #000000; 
      text-decoration: none; 
      font-weight: normal; 
      }
      a:hover { 
      color: #ed1c24;
      text-decoration: none; 
      }

Many thanks in advance.

Upvotes: 0

Views: 819

Answers (3)

BiscuitBaker
BiscuitBaker

Reputation: 1421

You can always apply a class to the <td> element itself:

<td class="myClass"> <a href="http://www.canvasbay.co.uk/pages.php?pID=5&CDpath=0">Get Started!</a></td>

And then modify the css to only target the a element in that class:

.myClass a { 
      color: #000000; 
      text-decoration: none; 
      font-weight: normal; 
      }
.myClass a:hover { 
      color: #ed1c24;
      text-decoration: none; 
      }

Upvotes: 3

Ricky Stam
Ricky Stam

Reputation: 2126

You can put an ID or class to the td and target only that

.myachor a:hover{color:#FFF !important;}

Upvotes: 1

Bharath R
Bharath R

Reputation: 1531

Do this like

.specialtd:hover
{
color: #ed1c24 !important;
text-decoration: none; 
}

<td class="specialtd"> <a style="color: #800000" href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>"><?php echo MENU_TEXT_HOME;?></a></td> 

Upvotes: 1

Related Questions