CSS - Css Mousover <td> Bgcolor Changes?
Have seen this effect around. Perhaps the CSS masters can tell me how I do it.
When you mouse over a Table cell the background color of the cell changes. I guess it could be javascript, but it seems like a CSS thing to me. How do I do that? Similar TutorialsHi all, First post in the CSS forums so go easy on me! I have the following style sheet : PHP Code: <STYLE TYPE="text/css"> .SearchBar { background-color: #FF0000; border-style: solid; border-color: #000000; border-width: 1px; } </STYLE> Im trying to call it like this : PHP Code: <table width="100%"> <tr class="SearchBar"> <td>Hello</td> </tr> </table> Which doesnt work as it only displays the background color. However if I call it like this : PHP Code: <table width="100%"> <tr> <td class="SearchBar">Hello</td> </tr> </table> Then that will work and display the bgcolor and the border. Is there no way I can use that class in the <tr> instead of the <td> as I may have a number of <td>'s in that row which means I would have to have only border top and bottom some cells, etc and that makes things more confusing than a straightforward style attached to a <tr> to be spread out along all the cells. Someone advised <tr> is not rendered hence you cannot have a border attached to it. This however makes no sense considering you can use <tr bgcolor="#000000> which surely is rendered. Thanks for any pointers Greets x0x Does anybody knows how to change the bgcolor of a box when we hover the mouse over it? Go http://www.avocadolite.com/v9/ to get what i mean. In this case the avocado's bgcolor is green, i think. I have a gradient background image that goes from dark to light. At the bottom of the table if the body of text grows too large the table will stretch past the length of the background gradient image exposing the bgcolor for the page (not acceptable). If I change the bgcolor of the table the color is applied over the background image. Isn't there a way to fix this with CSS? Thanks for any help!!! Hi, anyone an idea how to change both text color AND table cell bgcolor on rollover (using style sheets) ? thx Gerhard |