MoFish Posted April 24, 2006 Share Posted April 24, 2006 hello. This may seem a total simple question but I have a table/div, and am wanting it to change background colour when the mouse hovers over it. How exactly do I do this.<div class="changeme"> CHANGE ME <div>changeme a:link{ color: #000000;}something like this? Quote Link to comment https://forums.phpfreaks.com/topic/8270-roll-over-background-colour-change/ Share on other sites More sharing options...
wildteen88 Posted April 24, 2006 Share Posted April 24, 2006 If you want to change the background color of the div then use the :hover persuado-class. like so:[code]changeme:hover {color: #000000;}[/code][b]NOTE:[/b] This will not work in IE(6), How it will if you use javascript. Quote Link to comment https://forums.phpfreaks.com/topic/8270-roll-over-background-colour-change/#findComment-30158 Share on other sites More sharing options...
spyke01 Posted April 24, 2006 Share Posted April 24, 2006 to change the background youll need to do this:[code]changeme:hover {background: #000000;}[/code]some people use background-color: i just use background:you can also do this for an image background[code]changeme:hover {background: #000000 url('images/bg.jpg');}[/code]color: just changes text color Quote Link to comment https://forums.phpfreaks.com/topic/8270-roll-over-background-colour-change/#findComment-30164 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.