An exploration of stuff you probably already know by...some dude that works here.
*Okay not really, but WORK WITH ME HERE PEOPLE.
<h2><font color="red"><center>This is supposed to be red H2 text</center><font></h2>
"When I was your age, we coded styles inline with HTML attributes and deprecated tags like a bunch of savages!"
The W3C managed to get browser developers (Netscape, Microsoft, Opera) to adopt the standard, and suddenly things were peachy. CSS made layout and design more efficient.
"A long time ago, in a consortium far, far away..."
<blink> and <marquee> tags), and by 2011, CSS 3 was old enough to fly an X-Wing fighter and do other cool neato things.Tell us how to not break things with this thing that does things with things.
CSS works from the top, down (from the highest level element: <html>, to the most infinitesimally granular elements within). You cannot traverse “up” the element tree from a descendant element.
This matters because:
<style> elements)
Long story short: elements inherit all rules from their parent elements unless new values are declared. Rules and declarations placed later in a style declaration will override those preceding them.
Now that I've thoroughly confused you, let's get even more complex.
Content following floated elements will flow around them until reaching the bottom "edge" of the floated element(s) in question.
.benches { clear: both; }
Is it just me, or are these Star Wars jokes getting out of hand?
Note: Relative, Absolute, and Fixed position elements cannot be floated.
Floating generally requires more code, but has more flexibility than positioning.
Because typing the same thing twice is letting the terrorists win.
By targeting as many of these as possible, you reduce the need for extra classes and/or ID selectors, which in turn reduces code bloat.
#someElementObjectID { /* This can apply to one object ONLY */
position: relative;
width: 80%;
}
.someRandomClass { /* This can be applied to any element as many times as you want, */
display: block; /* much like an object attribute */
padding: 1em;
background: #333;
font-size: 1.5em;
}
.someElement {
float: left;
margin: 1em;
padding: 1em;
background: #fff;
border: 5px solid #000;
}
.someElement > p {
font-size: 1.5em;
line-height: 2em;
}
.someElement > p > span {
color: #00f;
}
.someElement > p > a {
text-decoration: none;
}

"I don't have pet peeves, I have majorly psychotic hatreds..." -George Carlin
The VinSolutions style guide is available on Dev, and covers HTML, CSS, and JS.
This one is simple: Use proper indentation
.some-other-element {
declaration: value;
}
@media only screen and (max-width: 940px) {
.some-other-element {
declaration: value;
}
}
<div class="some-other-element">
<ul class="unstyled">
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>
</div>
If you don't use proper indentation, you're letting the terrorists win. True Story.