2 replies [Last post]
nix
nix's picture
Offline
Enthusiast
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Last seen: 12 years 27 weeks ago
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Timezone: GMT-4
Joined: 2003-08-12
Posts: 159
Points: 0

I have a table that highlights the cell when I rollover the text, thats fine. What I want to do is limit it to a certain group of cells. how? is it with the <div class>?

I refuse to be like the faceless masses of sheep and have a signatu......awwwwwwwww CRAP!!

Backups? Ha! I've never had troub**&{[}$$ERROR NO CARRIER

eff
Offline
Regular
Berlin, Germany
Last seen: 17 years 12 weeks ago
Berlin, Germany
Timezone: GMT+1
Joined: 2004-09-10
Posts: 18
Points: 0

I have a table rollover problem

Easiest would be giving all tds a certain style and override the tds you want with a specific class

/* All td elements within the table of class="tableclassname" */

.tableclassname td {
    background-color: #bla;
}

/* All td elements of class="specifictdclass" which are hovered and are within the table of class="tableclassname" */

.tableclassname td.specifictdclass:hover {
    background-color: #highlighted;
}

There is also the possebility to add that behavior to tr elements if you want to hightlight entire rows.

And if you like to like to highlight every first td in a row

.tableclassname tr td:firstchild:hover {
    background-color: #highlite;
}

this should do.

Someone feel free to proove me wrong as the last one is ontested and I have no Idea how different browsers like that...

Fruits rock!

nix
nix's picture
Offline
Enthusiast
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Last seen: 12 years 27 weeks ago
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Timezone: GMT-4
Joined: 2003-08-12
Posts: 159
Points: 0

I have a table rollover problem

Thanks! you've helped alot! the first answer worked for me. it was just a class problem with me and a minor typo

code:

td: hover

what it should've been was:

td :hover

I refuse to be like the faceless masses of sheep and have a signatu......awwwwwwwww CRAP!!

Backups? Ha! I've never had troub**&{[}$$ERROR NO CARRIER