Add CSS attributes to a CSS button style on hover?

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

12-Jan-12 11:48
I need a little help, and I am guessing this is pretty darn simple!

I have given my button a CSS style, and I just want to add a fill color and change the text color on hover and click.

css:



.IsEvButton {
padding: 6px 22px 0px 18px;
font-family: MelanyLane;
font-weight: normal;
font-style: normal;
font-size: 22pt;
margin-bottom: -20px;
margin-top: -9px;
color: #6b645e;
border-width: 1px;
border-style: solid;
border-color: #6b645e;
}



and the code:



<input type="submit" name="Submit" value="Send Message" class="IsEvButton"/>


Any help is appreciated greatly!
16-Jan-12 02:53
@abigailhamilton: Welcome to the forums

To change colours on hover:


.IsEvButton:hover {
background: white;
color: red;
}


To change colours on click:


.IsEvButton:active {
background: white;
color: green;
}


Hope that helps!

Matt

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/
16-Jan-12 15:15
Matt, THANK YOU! It works perfectly.
19-Jan-12 23:39
@abigailhamilton: You're welcome - glad I could help!

Cheers,
Matt

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated