Solved

ASP.net Hover color not working when background color applied

Posted on 2014-04-14
4
1,563 Views
Last Modified: 2014-04-14
Hi
The background color seems to stop the color changing on mouse hover in the following ASP.net code

 <style type="text/css">
        .style1
        {
            height: 34px;
        }
        .myHoverButton {
            background-color: white !important;
        }
        .myHoverButton:hover {
            background-color: #9999ff;            
        }  
    </style>

      <button id="button10"  class="myHoverButton">Submit</button>
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 39998807
Remove  from style , what you want to do with this ?

.myHoverButton {
            background-color: white !important;
        }

this is working

 <style type="text/css">
        .style1
        {
            height: 34px;
        }
           .myHoverButton:hover {
            background-color: #9999ff;            
        }  
    </style>

      <button id="button10"  class="myHoverButton">Submit</button>
0
 

Author Closing Comment

by:Murray Brown
ID: 39998813
Thanks. It works
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39998815
If you want white background try this
<style type="text/css">
        .style1
        {
            height: 34px;
        }
        .myHoverButton {
            background-color: white ;
        }
        .myHoverButton:hover {
            background-color: #9999ff;            
        }  
    </style>
0
 

Author Comment

by:Murray Brown
ID: 39999001
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question