css - Prevent link from changing when mouse button is released -


i have element like:

<a id='a_id' class='a_class'>next</a> 

the element shows in green, underlined.

when hover on element, changes lighter green, not underlined (which fine).

when click, during mouse button down nothing changes.

when release mouse button, element changes briefly showing green background , goes lighter green, not underlined.

how can change css prevent change when release mouse button?

i tried following css:

.a_class {     cursor:pointer;     outline:none;     text-decoration:none;     background:#fff; } 

thanks.

update #1 - using .a_class:active

i added following css:

.a_class:active {     outline:none;     text-decoration:none;     background:#fff;     color:red; } 

i added color:red confirm css being applied.

when press down mouse button, text color changes red. , when release mouse button, background flashes in green second.

any other suggestion?

thanks.

update #2 - adding full css of link

when inspect page firebug element has following css:

.a_class {   background:#ffffff;   cursor:pointer;   outline:none;   text-decoration:none; }  {   color:#24890d;   text-decoration:none; <- crossed out }  .entry-content a, .entry-summary a, .page-content a, .comment-content {   text-decoration:underline; <- crossed out }  html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {   border:0;   font-family:inherit;   font-size:100%;   font-style:inherit;   font-weight:inherit;   margin:0;   outline:0; <- crossed out   padding:0;   vertical-align:baseline; } 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -