Jump to content


Photo

Roll Over Background Colour Change


  • Please log in to reply
2 replies to this topic

#1 MoFish

MoFish
  • Members
  • PipPipPip
  • Advanced Member
  • 210 posts

Posted 24 April 2006 - 04:02 PM

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?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 24 April 2006 - 04:21 PM

If you want to change the background color of the div then use the :hover persuado-class. like so:
changeme:hover {
color: #000000;
}
NOTE: This will not work in IE(6), How it will if you use javascript.

#3 spyke01

spyke01
  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts

Posted 24 April 2006 - 04:39 PM

to change the background youll need to do this:
changeme:hover {
background: #000000;
}

some people use background-color: i just use background:
you can also do this for an image background
changeme:hover {
background: #000000 url('images/bg.jpg');
}

color: just changes text color

[a href="http://www.fasttracksites.com" target="_blank"]Cheap PHP Hosting[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users