0

HI friends..

In a menu suppose there is an item MAIN that has drop down fro its sub categories (sub1, sub2, sub3,...). Now when mouse :hovers over MAIN I can do what ever I want. But when mouse hovers over any of its sub categories, say sub1, I want MAIN to look bold and of a particular. How can I achieve this using CSS.

thanks..

Rahul Utb
  • 489
  • 2
  • 7
  • 15

1 Answers1

1

In all brevity, you can't. There's no such thing as a parent selector in CSS, even though it has been discussed in the past. But if you consider the C in CSS carefully, a parent selector doesn't make much sense in any case.

Here's another question which deals with a related/similar issue: Complex CSS selector for parent of active child

Community
  • 1
  • 1
polarblau
  • 17,649
  • 7
  • 63
  • 84