seymar
seymar

Reputation: 4063

CSS: Using two adjacent selectors to select element after adjacent element

How can I do something like this?

element + adjacent_element + element_to_style {
    /* somestyle */
}

I want to style an element that's adjacent to the adjacent element.

EDIT:

This code works properly, I just forgot the . before the classnames. That's why it didn't work.

Upvotes: 0

Views: 1260

Answers (1)

Litek
Litek

Reputation: 4888

There is ~ general sibling selector. But is css3 so the browser support is limited.

Upvotes: 3

Related Questions