#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. User Avatar
    Permalink to comment#

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

  2. User Avatar
    Permalink to comment#

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

  3. User Avatar
    Permalink to comment#

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

  4. User Avatar
    Permalink to comment#

    This layout seems very similar to that used by the LessCSS (http://lesscss.org). What are your thoughts about using LessCSS for theme development?

  5. User Avatar
    Adam Silverman
    Permalink to comment#

    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!

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.