A Cleaner way to Code CSS

February 12, 2007

I’ve recently been looking at installing a component called “LightBox” a hot little javascript / AJAX / CSS component that allows you to create some pretty cool things. Stay tuned for an up coming article about this component but in the meantime I wanted to talk a little bit about clean CSS coding

LightBox and LightBox 2.0 were written by a guy out of Boston by the name of Lokesh Dhakar. Naturally I decided to check out his site and found an interesting CSS related article he wrote about a year ago. The point still holds true when developing kickass CSS. Some tips that make sense include…

  • Grouping Your Styles – Why not keep it organized when it comes to CSS; makes it easier to edit and update further down the road
  • Keep Track of your DIVs – If you get pretty complex in your CSS development then you’ll know how easy it is to misplace a DIV; remember to K.I.S.S. (Keep it Simple Stupid)

If you are interested in reading a little more of Lokesh’s post about Clean CSS practices then just click here.

Everyone has their own style when it comes to coding but the way that Lokesh presents it doing a clean and coherent CSS makes everyone’s world easier.

Luc

Comments

2 Responses to “A Cleaner way to Code CSS”

  1. A little LightBox to lighten up your day on February 13th, 2007 12:52 pm

    […] I talked about the other day in my CSS article, Lightbox, is a JavaScript/AJAX component used to give a slicker look and feel to Overlay Images on […]

  2. The Genealogist on February 15th, 2007 3:59 am

    Great points to remember when doing CSS .. and for coding in general, might I add.

Got something to say?





*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation