Murray Brown
asked on
Using CSS to set a button color when not hovering
Hi
I was given the following code to change the back color of a button on mouse hover.
What other css code would I use to change the color to white when there is no mouse hover
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.myHoverButton:hover { background-color: #9999ff; }
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<button id="button1" class="myHoverButton">Subm it</button >
</div>
</form>
</body>
</html>
I was given the following code to change the back color of a button on mouse hover.
What other css code would I use to change the color to white when there is no mouse hover
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.myHoverButton:hover { background-color: #9999ff; }
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<button id="button1" class="myHoverButton">Subm
</div>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER