Skip to content Skip to sidebar Skip to footer

Merge Two Css Class For Div Element

I have below css classes and want to merge to one, .classA { height: 500px; width: 800px; } .classB { height: 800px; } .classB > div { xxxx yyyy } .classA > div {

Solution 1:

Use a comma:

.classA > div, .classB > div {
 xxxx
 yyyy
}

Solution 2:

Use ,.

ClassA > div , classB > div { /* css rules */ }

Solution 3:

Just do like this:

.classA > div, .classB > div {
    xxxx
    yyyy   
}

Solution 4:

.classB > div, 
.classA > div 
{
   xxxx
   yyyy
}

Just use a comma

Post a Comment for "Merge Two Css Class For Div Element"