More useful is multiple classes and using them in the object oriented css style that is all the rage lately. Reference it in css like so:. CSS Selector that applies to elements with two classes 1 vastaus 7. How can I apply styles to multiple classes at once?
How to select an element with classes 2 vastausta 25.
Select element based on multiple classes 3 vastausta 29. Lisää tuloksia kohteesta stackoverflow. Välimuistissa Käännä tämä sivu 1 vastaus Chain both class selectors (without a space in between):. If you still have to deal with ancient . Instead of having two , three or more CSS rules, all of which do the same thing (set the color of something to re for example), you have a single CSS rule that accomplishes the same thing for your page.
In modern browsers, you can use multiple CSS classes on one element to apply styles as needed. Learn how to create CSS multiple classes. To specify multiple classes , separate the class names with a space, e.
This allows you to combine several CSS classes for one . You can have as many elements as you want in a class.