Sean H Jenkins
Sean H Jenkins

Reputation: 1780

Action on one CSS element causes effect on another?

Simple enough question.

For example can I change the style of say .inner-div when .outer-div is hovered?

div.outer-div{}
div.inner-div{}

This is just an example, it could just as well be .inner-div affects .outer-div

I understand this isn't natively supported by CSS, although media queries may do the trick? I'm not sure though? Any ideas on changing an element from another?

Please don't answer with, "You can use JQuery". I'm looking for only CSS methods here.

Upvotes: 0

Views: 117

Answers (1)

shanethehat
shanethehat

Reputation: 15570

Assuming that inner is inside outer, you can use div.outer-div:hover div.inner-div {}

Upvotes: 1

Related Questions