/ Published in: CSS
Easy and easy to forget the proper syntax. If you want to set multiple classes on an html element it should look like:
with all class names inside the same set of double quotes with a space between each. The CSS specificity is controlled by the order of the classes in your CSS file. If your CSS has:
then text inside the div will be red as class-1 is the last declared in the CSS. The order the classes appear in the html is irrelevant.
Expand |
Embed | Plain Text
1 class-2 {color: blue} 2 class-3 {color: green} 3 class-1 {color: red}
You need to login to post a comment.
