CSS disable hover effect

0 votes

In the entire DOM, I need to disable mouse hover on a specific button (not all buttons). Please tell me how to do this with a CSS class.

When my button is disabled, I use the CSS class below. Now I want to use the same class to eliminate the hover effect.

.buttonDisabled
 {
 Cursor:text !important; Text-Decoration: None !important; 
 } 

On mouse over, the above class will remove the hand symbol and the text underlining. Now I'd like to get rid of the hover effect as well. Please advise me.

Jun 2 in CSS by Edureka
• 8,060 points
209 views

1 answer to this question.

0 votes

I have really simple solution for this.

just create a new class

.noHover{
    pointer-events: none;
}

and use this to disable any event on it. use it like:

<a href='' class='btn noHover'>You cant touch ME :P</a>
answered Jun 10 by Edureka
• 9,540 points

Related Questions In CSS

0 votes
0 answers

Fading in a background image using javascript or css on hover

I have so far been able to ...READ MORE

3 days ago in CSS by Edureka
• 8,060 points
7 views
0 votes
1 answer

What is css Combinator?

hey @kartik, A combinator is something that explains ...READ MORE

answered Feb 4, 2020 in CSS by Niroj
• 82,720 points
325 views
0 votes
0 answers
0 votes
1 answer

How do I give text or an image a transparent background using CSS?

Use either a semi-transparent PNG or SVG ...READ MORE

answered May 27 in CSS by Edureka
• 9,540 points
25 views
0 votes
1 answer

How to change CSS property using JavaScript

Use document.getElementsByClassName('className').style = your_style. var d = document.getElementsByClassName("left1"); d.className = ...READ MORE

answered 5 days ago in CSS by Edureka
• 9,540 points
13 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,500 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
1,654 views
0 votes
1 answer

Creating a Zoom Effect on an image on hover using CSS?

Try using the following code: <style> .zoom { ...READ MORE

answered Jun 17 in CSS by Edureka
• 9,540 points
16 views
0 votes
1 answer

Is there any way to colorize a white PNG image with CSS only?

Filters can be used with -webkit-filter and ...READ MORE

answered May 27 in CSS by Edureka
• 9,540 points
30 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP