Dejan Biljecki
Dejan Biljecki

Reputation: 605

Css table transparency

Is it possible to make all of the content inside a table transparent on hover by using css- for example

<table><tr><td> AN IMAGE </td> <td> SOME TEXT </td></tr></table>

so if either the image or the text are hovered, both will become transparent? Again - by using ONLY css.

Upvotes: 1

Views: 1776

Answers (2)

Kevin Boucher
Kevin Boucher

Reputation: 16675

table:hover td { visibility: hidden; }

Upvotes: 3

Alvaro Louren&#231;o
Alvaro Louren&#231;o

Reputation: 1341

You can try:

table:hover { opacity: .5 }

... in case you you want to adjust how much transparency you want (any value from 0 to 1).

Upvotes: 4

Related Questions