How can I apply styles to multiple classes at once?

sat picture sat · Jan 20, 2010 · Viewed 283.8k times · Source

I want two classes with different names to have the same property in CSS. I don't want to repeat the code.

Since both classes are doing the same thing, I should be able to merge it into one. How can I do that?

Answer

Juraj Blahunka picture Juraj Blahunka · Jan 20, 2010
.abc, .xyz { margin-left: 20px; }

is what you are looking for.