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, 2022 in CSS by Edureka
• 13,620 points
18,368 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, 2022 by Edureka
• 12,690 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, 2022 in CSS by Edureka
• 13,620 points
1,057 views
0 votes
0 answers

Can I have an onclick effect in CSS?

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

Jul 20, 2022 in CSS by Edureka
• 13,620 points
492 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, 2022 in CSS by Edureka
• 13,620 points
1,075 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,880 points
992 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, 2022 in CSS by Edureka
• 12,690 points
772 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, 2022 in CSS by Edureka
• 13,620 points
422 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
10,470 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, 2022 in CSS by Edureka
• 12,690 points
1,798 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, 2022 in CSS by Edureka
• 12,690 points
1,919 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP