Two tips for writing CSS code
Declare CSS within a single line
Let's compare the following two pieces of code:
h2 {font-size:18px; border:1px solid blue; color:#000; background-color:#FFF;}
h2 {
font-size:18px;
border:1px solid blue;
color:#000;
background-color:#FFF;
}
The second one looks really formatted, but it doesn't help in reading. Writing in one line allows you to quickly find the part you need.
I used to write a similar second way, but gradually discovered as the article said, not much use. A line looks refreshing and saves the place and makes the file smaller.
Block-writing code
This way the writing code can make CSS more page, in the presence of problems can be the shortest time to find the problem. Just like the following:
#content {float:left;}
#content p { … }
#sidebar {float:left;}
#sidebar p { … }
#footer {clear:both;}
#sidebar p { … }