Solved

ASP.net Hover color not working when background color applied

Posted on 2014-04-14
4
1,511 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

Technology Partners: 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

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.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
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…

685 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