Grow your CSS skills. Land your dream job.

#8: CSS Formatting

Being organized and using good formatting in your CSS files can save you lots of time and frustration during your development process and especially during troubleshooting. The multi-line format makes it easy to browse attributes but makes your file vertically very long. The single-line format keeps your file vertically short which is nice for browsing selectors, but it's harder to browse attributes. You can also choose how you want to group your CSS statements. Do you do it by section, like header, content, footer? Or do you do it by types of attributes like typography and layout? Being organized, hierarchical, and using CSS shorthand will go a long way in making you a better CSS coder.

Links from video:


  1. This is really nice:: Thanks can i get all your screen casts on a CD? that will be appreciated

  2. Mhosis
    Permalink to comment#

    Many thanks ! Your Videos are very helpful. It`s definitely the best CSS Website !

  3. spaceRocker
    Permalink to comment#

    Well, this is going to save me so much time. Thanks!

  4. Permalink to comment#

    This layout seems very similar to that used by the LessCSS ( What are your thoughts about using LessCSS for theme development?

  5. Thanks for posting this. I always get up trying to figure out if I’m doing something the “right” way. It helps to know other folks think about it, and helps to know that I’m on the right track. Appreciate it man!


Leave a Comment

Posting Code

Markdown is supported in the comment area, so you can write inline code in backticks like `this` or multiline blocks of code in in triple backtick fences like ```this```. You don't need to escape code in backticks, Markdown does that for you.

Sadly, it's kind of broken. WordPress only accepts a subset of HTML in comments, which makes sense, because certainly some HTML can't be allowed, like <script> tags. But this stripping happens before the comment is processed by Markdown (via Jetpack). It seems to me that would be reversed, because after Markdown processes code in backticks, it's escaped, thus safe. If you think you can fix this issue, get in touch!

If you need to make sure the code (typically HTML) you post absolutely posts correctly, escape it and put it within <pre><code> tags.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".