Solved

ASP.net Hover color not working when background color applied

Posted on 2014-04-14
4
1,447 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:murbro
  • 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:murbro
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:murbro
ID: 39999001
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ADO.NET ENTITY DATA MODEL 3 32
Run time Error 4 35
Problem with a CSS in a page 2 27
CSS z-index issue 3 22
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now