...

View Full Version : Change Color on click



ankur_gurha
08-08-2006, 08:34 AM
Hi Guys,

I am trying to change the color of the Tab once i have clicked the hyperlink and the underline row color as well but after trying for long i cant figure out as how to do it pleas help. I am posting the HTML and the CSS

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td nowrap="nowrap">
<div>

<a id ="stup" class="Tab" href="../SearchScreens/JobSearch.aspx" title="Jobs Tab">Jobs</a></div>

</td>
<td nowrap="nowrap">
<div>
<a class="Tab" href="../SearchScreens/CorpSearch.aspx" title="Accounts Tab">Accounts</a></div>
</td>
<td nowrap="nowrap">
<div>
<a class="Tab" href="../SearchScreens/CorpSearch.aspx" title="Quality Tab">Quality</a></div>
</td>


<td nowrap="nowrap">
<div>
<a class="Tab" href="../SearchScreens/CorpSearch.aspx" title="Operations Tab">Operations</a></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="sp">
</td>
</tr>
</table>

The CSS running against it is, which u can see is been put against every hyperlink

.Tab
{
background-image: url(../images/tab_white2.jpg);
padding-left: 5px;
background-repeat: no-repeat;
display: inline-block;
text-decoration: none;
color: #373937;
font-size: 8pt;
height: 20px;
width: 100px;
padding-top: 3px;
vertical-align: middle;
margin-right: 0px;
text-align:center;

}

I hope, i have well explained what i am trying to achieve please help.
Once again i need to change the Tab color which is nothing more than the image color which is been referenced in the CSS, once i have clicked the hyperlink.

So please help as how can i change the image once i have clicked on the hyperlink or if its possible to do it via javascript.

Thanks in advance..

A..

vwphillips
08-08-2006, 10:25 AM
when you click the link, the link page will be loaded, so I guess you need a cookie to remember what has been clicked when the visiter returns to the page



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum