Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i click link how to change selected color in image in css using javascript how to i use javascript in below code

.review {

padding-left:55px;
display: inline-block;

}
.icon1 {
display: inline-block;
background: url('../userimage/icon.jpg') no-repeat -32px -40px;
width: 12px;
height: 14px;
padding-left: 6px;



}
.icon2{
display: inline-block;
background: url('../userimage/icon.jpg') no-repeat -32px -66px;
width: 12px;
height: 14px;
padding-left: 6px;



}
.icon1:hover
{

background: url('../userimage/icon.jpg') no-repeat -13px -40px;
width: 12px;
height: 14px;
cursor: pointer;
}

.icon2:hover
{
background: url('../userimage/icon.jpg') no-repeat -13px -66px;
width: 12px;
height: 14px;
cursor: pointer;


}



.icon {
cursor: pointer;
color: #848484;
font-weight: bold;
margin-left: 5px;
}



Was this review helpful?

Yes
No

Posted
Comments
Member 10918596 28-Jan-15 0:29am    
how to style a selected button/link with css or javascript
jaket-cp 28-Jan-15 11:03am    
Can you clarify your question and supply the html link/button that you want styles.

Also have a read of hover in css: http://www.w3schools.com/cssref/sel_hover.asp
It maybe what you are looking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900