Page 1 of 1
Problem with highlighting in table rows
Posted: Sun Feb 28, 2010 10:16 am
by MicroBoy
I saw some forms of highlighting in internet, there are a lot of cases, one of them is perfect instead of one thing, with that I can't set the font color. This is the way, but I can't set the font color, if I use class instead of bgcolor, this script doesn't work.
Code: Select all
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';">
p.s. Is there any simple form like this, but to set the font color too.
Re: Problem with highlighting in table rows
Posted: Sun Feb 28, 2010 12:50 pm
by kaszu
You can use CSS instead of javascript, but it won't work in IE6.
Code: Select all
... tr td {
background: #fff;
}
... tr:hover td {
background: gold;
color: red;
}
Re: Problem with highlighting in table rows
Posted: Sun Feb 28, 2010 1:57 pm
by MicroBoy
That's the problem

it is not cross-platform using that form of CSS. I found in Internet that using the above code, the code in CSS will work in IE too, but it caused some design problems of the table:
Re: Problem with highlighting in table rows
Posted: Mon Mar 01, 2010 12:01 pm
by kaszu
You can fix :hover for IE6 using this
http://www.xs4all.nl/~peterned/csshover.html, then it will be cross-browser.