-1
div * + * {
  margin-top: 1em;
}

I have seen this selector a lot. I know div * means to select all the children + means to select all the siblings after that element

But what does it means to use * + *?

Twinkle
  • 59
  • 1
  • 5
  • It means the same as `+` as you know but the element on left and right side can be anything. See this https://jsfiddle.net/yk0Lz9g2/1/ – vee Nov 03 '22 at 03:52

1 Answers1

0

Explanation

When you use the + character, you should focus on the end of your combinator statement, in this case the last * character in div * + *. div * means all elements in the div. div * + means adjacent elements of all elements in the div. div * + * means all adjacent element of all elements in the div. To wrap this up, All element in the div tag that proceed other elements must receive a top margin of 1em. For more explanation on this The lobotomized owl selector

K JOHN
  • 195
  • 7