I was creating a
Many classes can be assigned to an element, you just separate them with a space Because of the cascade in CSS, the overwriting rules closest the to bottom of the document will be applied to the element. So if you have The red color will be used, but not the background color as it was not overwritten. You must also take into account CSS specificity, if you have a more specific selector, this one will be used: The second selector here will be used as it is more specific. You can take a look at it all here.
.myClass
{
background: white;
color: blue;
}
.keepOnClassing
{
color: red;
}
.myClass
{
background: white;
color: blue;
}
div.myClass.keepOnClassing
{
background: purple;
color: red;
}
.stayClassySanDiego
{
background: black;
}