HTML and CSS Reference
In-Depth Information
<p class="bd">This is my blog where I talk about only the
bestest things in the whole wide world.</p>
Di " erent elements on the page could have a heading and a body. They're
“protected” in that they're a child selector of box . But this isn't always as
evident when we're looking at the HTML. We should clarify that these
particular hd and bd classes are for the box module.
.box .box-hd {}
.box .box-bd {}
With this improved naming convention, we don't need to combine the
selectors anymore in an attempt to namespace our CSS. Our final CSS looks
like this:
.box {
border: 1px solid #333;
.box-hd {
margin: 0;
padding: 5px 10px;
border-bottom: 1px solid #333;
background-color: #CCC;
.box-bd {
margin: 10px;
Search WWH ::

Custom Search