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
• 9,760 points
946 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

Jun 30 in CSS by Edureka
• 9,760 points
20 views
0 votes
0 answers

Can I have an onclick effect in CSS?

I have an image element that I ...READ MORE

Jul 20 in CSS by Edureka
• 9,760 points
8 views
0 votes
0 answers

Using CSS for a fade-in effect on page load

Can a text paragraph fade in on ...READ MORE

Jul 29 in CSS by Edureka
• 9,760 points
12 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,740 points
335 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 Jun 28 in CSS by Edureka
• 9,540 points
22 views
0 votes
0 answers

How to make in CSS an overlay over an image?

I want to add this dark hue, ...READ MORE

Jul 22 in CSS by Edureka
• 9,760 points
15 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,700 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
44 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
63 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