CSS element+element Selector
ExampleHow to style all <p> elements that are placed immediately after a <div> element:
Try it yourself » |
Definition and Usage
The element+element selector styles a specified element that is placed immediately after (not inside of) a specified element.
Browser Support
The element+element selector is supported in all major browsers.
Note: For element+element to work in IE, a <!DOCTYPE> must be declared.
CSS Version
The element+element selector was first introduced in:
CSS 2
Complete CSS Reference