Skip to content

roots

general sibling combinator

Tended 19 days ago Planted 19 days ago Mentioned 1 time

Contents

The general sibling combinator - ~ - selects the defined elements that are located somewhere after the preceding (prior defined) element and that are within the same parent.

example

p ~ img would style all images that are located somewhere after a paragraph provided they share the same parent.

see also

references

Mentions

  • child combinator

    …whereas `article p` selects **all** `p` within `article`. ### see also - [[general sibling combinator]] ### reference: - [modern css](https://moderncss.dev/guide-to-advanced-css…