Shoutbox

html question - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: html question (/showthread.php?tid=62761)

html question by jordanspringer on 07-07-2006 at 06:01 PM

i'm looking to make a table, but when the mouse hovers over each cell in the table, i want the background color of the cell to change. is this possible? thanks


RE: html question by stoshrocket on 07-07-2006 at 06:52 PM

i suppose you could do it with css... what would the code for the table be?? (tables arent my strong point so im not sure...)


RE: html question by pollolibredegrasa on 07-07-2006 at 06:57 PM

This what you want?


RE: html question by RaceProUK on 07-07-2006 at 07:41 PM

quote:
Originally posted by fatfreechicken
This what you want?
Don't rely on script to do that: people can turn it off. Instead, use the :hover pseudo-class.
code:
td {
    background: #CCCCCC;
}

td:hover {
    background: #999999;
}

RE: html question by ShawnZ on 07-07-2006 at 07:54 PM

':hover' only works on 'a' elements containing a 'href' in IE, just so you know.


RE: html question by jordanspringer on 07-07-2006 at 08:10 PM

thanks, that helps alot


RE: html question by RaceProUK on 07-07-2006 at 10:03 PM

quote:
Originally posted by ShawnZ
':hover' only works on 'a' elements containing a 'href' in IE, just so you know.
Does it? Damn :(
Not according to w3schools.com: :hover is supported across the board :D
[Image: attachment.php?pid=689311]