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
Solved

ASP.net Hover color not working when background color applied

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 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 …

808 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