Darshh123
Darshh123

Reputation: 13

How to add a class selector name to another existing class selector in css?

.flavor {
  text-align: left; 
  width: 75%;
}

Now I want to add another class selector "dessert" to this "flavor" class selector. How to add it?

Upvotes: 1

Views: 2720

Answers (1)

Lukas249
Lukas249

Reputation: 2471

Just add next selector after comma.

.flavor, .dessert {
   text-align: left; 
   width: 75%; 
}

Upvotes: 2

Related Questions