class selectors
When to use classes?
- Within a page, there are elements that are the "same" from a markup perspective, but need to be styled differently.
- Within a site, there is content that has the "same" markup, but needs to be styled differently.
section {
background-repeat: no-repeat;
background-size: 80px;
padding-left: 100px;
padding-bottom: 1.5rem;
}
section h2 {
color: rgb(163,28,48);
}
section.html {
background-image: url(../images/logo-html5.png);
}
section.css {
background-image: url(../images/logo-css3.png);
}
section.javascript {
background-image: url(../images/logo-js.png);
}