Quick Guide to CSS

Introduction

Notes from "CSS, The Definitive Guide, 3rd Edition" by Eric A. Meyer

.myclass -> use in <span></span>

#mycontainer -> use with "id="

<div class=#myclass> or <div id=mycontainer>

In element, don't confuse margin (outside) and padding (inside).

To put first letter in capital: p:first-letter {...}

Q&A

Fixed vs. liquid?

Floated elements?

Pseudo-elements?

id vs. class?

span vs. div?

Notes from "CSS No Crap Primer"

http://wendypeck.com/css101.html

"as divs are supposed to be unique on a page, it's generally better to use class styles when you are talking about controlling text.)"

you need to create a class style. Instead of using an HTML tag, you will use .(dot)name.

.redtext {

color: #FF0000;

}

<p class="redtext">

instead of adding the redtext style to the whole paragraph, add it only to a few words with the span tag: <p>Simple <span class="redtext">content text</span> ready for control.</p>

.menu {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 11px;

color: #000000;

}

.menu a:link {

color: #336600;

text-decoration: none;

}

<p class="menu"><a href="services.html">services</a> | <a href="products.html">products</a>

| <a href="company.html">company</a> | <a href="cotnact.html">contact</a></p>

Resources