We love social media, but we do not expect you to create yet another public outpost on the Web.
One of hundreds of answers available with our premium content service.
A: It is not possible to combine rules in a CSS stylesheet, but you can assign multiple classes to a single HTML element in a space separated list, as below.
<pclass="Opening Classic">...</p>
This heading should then be selected by both the following rules and be rendered in a larger cursive font:
.Opening {
font-size: 110%;
}
.Classic{
font-family: "Apple Chancery",
cursive;
}
Multiple class selectors are not supported by the old Netscape 4 Web browser, typically resulting in no relevant styles being applied at all, but all contemporary browsers support this approach reliably.
… full answer hidden
Premium members click below for full answer
How can I combine style rules with each other?