LiamProductions Posted October 26, 2007 Share Posted October 26, 2007 Hey. Help me please. Right. I have a div. and on mouseover i want it to change color. heres my code: Index.html <html> <head> <title> Test run </title> <link rel="stylesheet" href="./stylesheet.css"> </head> <body> <div class="header" onmouseover="this.background='black'"><br /><h1>Test run</h1> </div> </body> </html> stylesheet.css body { margin-left: 120px; margin-right: 120px; } h1 { color: white; margin-left: 30px; } .header { display: block; background-color: 464642; height: 130px; } Please help. maybe edit the code or something Thanks Quote Link to comment https://forums.phpfreaks.com/topic/74936-help/ Share on other sites More sharing options...
darkfreaks Posted October 27, 2007 Share Posted October 27, 2007 <div class="header" onmouseover="style.backgroundColor='#000000'"> Quote Link to comment https://forums.phpfreaks.com/topic/74936-help/#findComment-379136 Share on other sites More sharing options...
LiamProductions Posted October 27, 2007 Author Share Posted October 27, 2007 Thanks It worked. Quote Link to comment https://forums.phpfreaks.com/topic/74936-help/#findComment-379203 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.