473,394 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to change the color become static after click

1
can some1 help with this code.
can i add in a function like on click. when user click one of the link. the color will change to static from mouse over color. the text need to highligted after click.

thanks



<html>
<head>
<style type="text/css">
<!--

a {
text-decoration:none
}

.close {
visibility:hidden;
width:180px /* menu width */
}

.open1 {
visibility:visible;
border:1 solid #000000; /* menu border color */
background:52D6F7 /* menu bg */
}

.open2 {
border:1 solid #000000; /* down menu border */
background:EDED6D /* down menu bg */
}

.bg1 {
border:1 solid #000000; /* mouse on border */
background:DBDBDB /* mouse on bg */
}

.bg2 {
border:1 solid #000000; /* mouse off border */
background:EDED6D /* mouse off bg */
}

.bg3 {
border:1 solid #001000; /* mouse off border */
background:EDED6D /* mouse off bg */
}
-->
</style>
</head>
<body>
<div style="position:absolute;center:0px; top:150px"> <!-- position setting -->
<table align="center"><tr>

<tr valign="top"><table onMouseOver="this.style.visibility='visible'"
onMouseOut="this.style.visibility='hidden'" class=close>

<td><tr class=open1>Administrator Record</tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">Add New Admin</a></tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">List All Admin's Record</a></tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">Update Admin record</a></tr></td>
</table></tr>


<td valign="top"><table onMouseOver="this.style.visibility='visible'"
onMouseOut="this.style.visibility='hidden'" class=close>

<td><tr class=open1>Administrator Record</tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">Add New Job</a></tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">List All Job's Record</a></tr></td>
<td><tr class=open2 onMouseOver="this.className='bg1'" onMouseOut="this.className='bg2'"><a href="#.htm">Update Job record</a></tr></td>
</table></tr>


</tr></br>
</div></center>
</body>
</html>
Feb 7 '07 #1
1 6741
Hi,

I'm not sure if I understand you exactly but I think you want one of these CSS pseudo-classes:
a:visited { color: "Your-Colour"; }
a:active { color: "Your-Colour"; }
a:focus { color: "Your-Colour"; }
Look here
Feb 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sugapablo | last post by:
Can anyone help me out with some code to change three table cells (<td>) when one is hovered over? I have a calendar grid where each day is made up of three table cells and I want all three to...
1
by: Robbo | last post by:
Hello, I created a datagrid with a few hyperlink columns.. How do i change the color of the hyperlink itself? BLUE is a bit bad on my datagrid color scheme. Thanks, Rob
2
by: HS1 | last post by:
Hello all Do you know how to change color of a button when the mouse is over it (like a button in manu bar can change its color in a website) in VB.net Thank you S.Hoa
3
by: Mamatha | last post by:
Hi I want to change the color of icon,How it can be opened? and how can i change color. If any one knows please let me know Thanks in advance. Mamatha
1
by: Vd | last post by:
How do I change color of the tab. I have changed the color, but when I run the application the color is still using the original color which is the control color.
2
by: TonyVal - MSDN News | last post by:
Hi All, Anyone know how to change color for a 3D button like this button control does? http://www.econtechvn.com/en/aquabutton_detail.htm I see it is really cool. But, don't know how to do...
6
by: sr | last post by:
please help i have problem: I know how to change color row in table when my mouse is over on this row and change color to another color when my mouse is out from this row. but i dont know how to...
3
by: nma | last post by:
Hi How do I make the cell change color to 'black' after I click on it. The cell will remain black color until I click another cell which will also change to black. I can do the mouseover and...
3
by: prabhuaradhan | last post by:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.