Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
72
rated 0 times [  76] [ 4]  / answers: 1 / hits: 27115  / 12 Years ago, wed, december 19, 2012, 12:00:00

I'd like to apply a CSS to some linkbuttons on page load but one of them <a id=lb1>logoff</a> must keep its style, no hover nor other event must change its style.



The linkbuttons have no class and the css applied to all of them is done to tags, this way:



a
{
//style
}

a:hover
{
// style
}


Is it possible?


More From » jquery

 Answers
7

No, you can't.



You can use more specific selectors (or even inline CSS with the style attribute) so that they are less likely to be overridden accidentally.



You can use the (eugh) sledgehammer of !important so they will only be overridden by another !important rule.



There is no way to prevent them being overridden though.


[#81320] Tuesday, December 18, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
devonw

Total Points: 311
Total Questions: 116
Total Answers: 111

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;