Drifter Drifter - 1 year ago 70
ASP.NET (C#) Question

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

I am working on an asp.net webforms project. In it I am using an asp.net 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;


Answer Source
.dynamicMenuItemStyle td:hover a {
color: white;

When you hover on the td target the a

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download