view raw
Drifter Drifter - 8 months ago 38
ASP.NET (C#) Question

How to making he link text white whene hovered anywhere on the <td> element

I am working on an webforms project. In it I am using an menu control. In the fly-out menu, when hovered, I want to set the background color as blue and the text as white. It works fine except a minor issue. The text becomes white only when I exactly hover over the element. I want to make it white when I hover on the entire element which has the element. The following is the code:

This sets only the background blue and doesn't set the text color to white

.dynamicMenuItemStyle td:hover {
background: blue;
color: white;

This makes the color of the text in flyout menu to become white

.dynamicMenuItemStyle a:hover {
color: white;


.dynamicMenuItemStyle td:hover a {
color: white;

When you hover on the td target the a