Change list-style-type if it has a hyperlink - without javascript/jQuery

css

Solution

There's no "parent" selector in CSS. You cannot add a circle style to a `<li>` element, with the given requirements.

Though, it's possible to add the bullet to the anchor : http://jsfiddle.net/k5SQe/31/

li:hover a {
    display: list-item;
    list-style-type: disc;
}

Problem

Possible Duplicate: Complex CSS selector for parent of active child I have the following code: ``` <li> <a href="jsfiddle.net">Text</a> </li> <li> only text </li>​ ``` I have applied css to li element as: ``` li {list-style-type: circle;} ``` I want that the element li on hover should have list-style-type:disc, but only if it has an anchor element inside it. I know its a cakewalk using javascript, but is it possible to achieve this without javascript? I have tried something like this, but could not achieve it: http://jsfiddle.net/k5SQe/

Original source

Related problems