Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8330597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:10:17+00:00 2026-06-09T02:10:17+00:00

I have a button and I’ve added a gradient to it. Here is the

  • 0

I have a button and I’ve added a gradient to it.

Here is the code:

.mybutton {
    background: #258dc8; /* Old browsers */
    background: -moz-linear-gradient(top,  #258dc8 0%, #258dc8 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#258dc8), color-stop(100%,#258dc8)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #258dc8 0%,#258dc8 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #258dc8 0%,#258dc8 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #258dc8 0%,#258dc8 100%); /* IE10+ */
    background: linear-gradient(to bottom,  #258dc8 0%,#258dc8 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#258dc8', endColorstr='#258dc8',GradientType=0 ); /* IE6-9 */
}

My problem is that in the hover state I want to get rid of the gradient and just have a plain background color.

.mybutton:hover {
    background-color: #333333;
}

For some reason this is not working as it’s not getting rid of the gradient.
The only way I’ve been able to change the gradient is by adding another gradient.

Is there a way to disable the gradient?

I’ve also tried background: none; but this didn’t do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:10:18+00:00Added an answer on June 9, 2026 at 2:10 am

    Gradients are image values, so setting background-color alone won’t affect your gradient. You’ll specifically want to override the background-image property (as well as filter while you’re at it):

    .mybutton:hover {
        background-color: #333333;
        background-image: none;
        filter: none;
    }
    

    If you use the shorthand background: none, you’re setting both the color and the image (none maps to background-image and omitting a color sets that to transparent), so you’ll get a transparent background instead.

    Of course, you could use the shorthand to declare just the color instead, and the image will implicitly be none:

    .mybutton:hover {
        background: #333333;
        filter: none;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i read Here and bit confused about the unregistering events. means i have button
I have button in my MVC 3 view. Here it is: <button rowId=@employee.Id value=refresh
I have Button and set background resource to it: button1.setBackgroundResource(R.layout.color00); color00: <?xml version=1.0 encoding=utf-8?>
I have button call this code private void but_Click(object sender, EventArgs e) { Thread
I have button which post values of form to url but during post i
I have button that a user selects and I pop up a AlertDialog to
I have button in my application that opens android contact application for choose contact
I have button, which fires an event, that deletes a record from the database.
I have one issue with Datetime Picker In my firstview i have button.If i
I have one issue with UInavigationcontroller In my firstview i have button.If i click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.