I don’t know how they are different in css
something
{
//some properties
}
something >.somethingelse
{
// something else's properties
}
and
something
{
//some properties
}
something .somethingelse
{
// something else's properties
}
I don’t know why there is such a > in the second case. Should there also be a < for use too ?
The
>indicates that direct childrensomethingelseare found undersomething. Otherwise descendants will be found at all levels.So using this following example:
For the
>example only the outersomethingelsediv will take effect. For the example without>both divs will have the style applied.<might imply a parent selector (ie apply a style to the direct parent of a matching class). I’m not aware of this existing yet, but theres an interesting post on it a csstricks here.