christopherson Posted April 8, 2013 Share Posted April 8, 2013 I'm trying to make a simple hover effect with my submit button CSS #submit1 a:hover{background-position: -1px -56px ;background-image:url(sprites.png);}#submit1{background-position: -140px -58px ;width: 112px;height: 33px;background-image:url(sprites.png);} HTML <div id="submit1"><a href="#"></a></div> Link to comment Share on other sites More sharing options...
Ingolme Posted April 8, 2013 Share Posted April 8, 2013 You don't need an <a> element to use the :hover pseudo-class. Put the :hover selector right on the submit button itself. Link to comment Share on other sites More sharing options...
newseed Posted April 8, 2013 Share Posted April 8, 2013 If you are not using a form tag or you require that the use of an anchor tag to submit data then you need to add display: block to the #submit1 id. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now