Style disabled button with CSS

0 votes

I'm trying to make a button with an embedded image seem different:

I'm attempting to:

  1. When the button is disabled, change the background colour.
  2. When the button is disabled, change the image in the button.
  3. When the hover effect is disabled, disable it.
  4. When you click and drag the image in the button, it appears separately; I don't want that to happen.
  5. The button's text can be selected. That's something I'd like to avoid as well.

I attempted to implement this in button[disabled]. Some effects, however, could not be turned off. such as top: 1px; relative position: relative; and image

Jun 13, 2022 in CSS by Edureka
• 13,620 points
691 views

1 answer to this question.

0 votes

I think you should be able to select a disabled button using the following:

button[disabled=disabled], button:disabled {
    // your css rules
}
answered Jun 13, 2022 by Edureka
• 12,690 points

Related Questions In CSS

0 votes
1 answer

Adding style to file upload button in css

The best approach would be to tie ...READ MORE

answered Aug 3, 2022 in CSS by Tanishqa
• 1,170 points
913 views
0 votes
0 answers
0 votes
1 answer

How to build a special polygon (a kite shape) with HTML & CSS only?

I made two divs, one for Arc ...READ MORE

answered May 28, 2022 in CSS by Edureka
• 12,690 points
1,544 views
0 votes
1 answer

Making a dotted grid with CSS

You can use the background-position CSS property to do ...READ MORE

answered May 31, 2022 in CSS by Edureka
• 12,690 points
2,042 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,540 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,250 points
2,846 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
924 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,954 views
0 votes
1 answer

Is there any way to animate an ellipsis with CSS animations?

You might try to time each ellipsis ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
1,205 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