Make It Readable 3. Start With A Framework: Group 1: All On One Line
Make It Readable 3. Start With A Framework: Group 1: All On One Line
1. Make it Readable
on.
.someDiv {
background: red;
padding: 2em;
works.
6. Combine Elements
Elements in a stylesheet sometimes share
properties. Instead of re-writing previous code,
why not just combine them? For example, your
this:
section! </editors-note>
2
3
4
5
6
7
styles go here...
</editors-note>
it wrong!
</editors-note>
9. Use the Right Doctype
The doctype declaration matters a whole lot on
whether or not your markup and CSS will
#crayon {
margin-left:
margin-right: 7px;
margin-top: 8px;
5px;
so:
#crayon {
2
3
<!DOCTYPE html>
- John Resig
#cotton-candy {
color: #fff;
float: left;
font-weight:
height: 200px;
margin: 0;
padding: 0;
width: 150px;
.left {float:left}
.right {float:right}
3
14. Use CSS Compressors
floated.
<h1>Header Text</h1>
of a parent div.
Text-transform is a highly-useful CSS property
18. Use Firebug
text-transform: lowercase;
logo's text with CSS. Just use the alt tag. While
the sort.
<editors-note>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Contact</a>
sizes.
.someclass li {...}
think? </editors-note>
(*cough IE cough*).
need them.
* {margin:0;padding:0;}
stylesheet.
<editors-note> However, be sure to consider
<editors-note> The problem is that, because
it. </editors-note>
30. Check for Closed Elements First When
Debugging
Beginners
3rd
Grading
Period