Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends

I am not using jquery and want to do something normaly.

well I have made an multicolumn menu using div and css.

everything is fine but got stuck at last.

I have a link in html
<a href="">abc</a>

Css
#topOption td>a{vertical-align:middle; color:#F8E1AB;text-decoration:none; font-size:small;border:solid 7px black; border-bottom-width:0px; }


a:hover{border:solid 7px white;background-color:#fff;color:Black;font-size:small;}

this works fine, but I want when I move out the mouse it should remain same with above i.e. a:hover style.

I thought I should use :after but it wasn't that I was expecting.

Please guide me
Thanks and Regards
Posted

1 solution

I think it should be like below(You missed #topOption td> before the hover)
CSS
#topOption td>a{vertical-align:middle; color:#F8E1AB;text-decoration:none; font-size:small;border:solid 7px black; border-bottom-width:0px; }
#topOption td>a:hover{border:solid 7px white;background-color:#fff;color:Black;font-size:small;}

Simple code is
CSS
a
{
background-color:grey;
}
a:hover
{
background-color:yellow;
}
 
Share this answer
 

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