Guest GSM2407 Posted January 3, 2006 Share Posted January 3, 2006 I have started a website and want to know how to do one thing:-I want to create a link in which the background colour changes to blue on mouse over.Please help Link to comment Share on other sites More sharing options...
Jonas Posted January 3, 2006 Share Posted January 3, 2006 (edited) <html><head><style type="text/css"><!--a:hover {background-color: blue;}--></style></head><body><a href="http://www.w3schools.com">W3Schools</a></body></html> That will make your link blue on mouseover/hover. Edited January 3, 2006 by Jonas Link to comment Share on other sites More sharing options...
aspnetguy Posted January 3, 2006 Share Posted January 3, 2006 <html><head><title> my webpage</title><style>a{color:blue;}a:hover{background-color:blue;color:white}</style></head><body><a href="somepage.html">Some label</a></body></html> the :hover is the 'mouseover' for CSS Link to comment Share on other sites More sharing options...
aspnetguy Posted January 3, 2006 Share Posted January 3, 2006 man, seriously...this is weird, we keep posting at the same time. lol :)Also Jonas your code only changes the color of the link to blue, you need to use background-color instead. Link to comment Share on other sites More sharing options...
Jonas Posted January 3, 2006 Share Posted January 3, 2006 I'm constantly one step ahead of you though... :)Whoops, I missed that "background" part... 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