Can we do nested CSS statements? Instead of repeating classes like:
.hello .world1 {}
.hello .world2 {}
We do something like:
.hello {
.world1 {}
.world2 {}
}
Is similar thing possible in CSS/CSS3?
Can we do nested CSS statements? Instead of repeating classes like:
.hello .world1 {}
.hello .world2 {}
We do something like:
.hello {
.world1 {}
.world2 {}
}
Is similar thing possible in CSS/CSS3?
You could combine child elements using: Child Selector
The child selector selects all elements that are the immediate children of a specified element.
The following example selects all "p" elements that are immediate children of a element:
Example:
div > p {
background-color: yellow;
}