Maintain a Standard CSS Structure
Me and my buddy were discussing our Cascading Style Sheets (CSS) woes because of an evil menu that refused to center itself. After the tiresome tries we just moved on and started discussing about our existing CSS structure. We decided we had to standardize our structure so editing will be less tedious for the both of us.
I’m a designer who’s got no real logical thinking when it comes to programming. I do whatever works for me and even better when it solves the problem. My structure is normally arranged according to the row of a website.
If the Header DIV is first in line then anything found in the there will be found under the Header even though if it’s a Paragraph (P) or Unordered List (UL). The reason I structure my CSS that way is so that elements for that section is easier to find. But of course the structure is then only understood by me quicker than my buddy who might need 5-10 minutes making sense of my structure.
One of the better structures I’ve seen for the first time was in the Kubrick theme by Michael Heilemann. He section out the CSS according to layout, header, lists, miscellaneous items and etc.
Some might not agree with me that it isn’t the best but it’s because we’re all so used to our own methods of structure.
This Simpla theme stylesheet though is rather well done as well. The author arranged everything to layout, content, comment, and etc.
So far I’ve found the Simpla structure the easiest to manage and find whatever I need without taking too much turnaround time figuring where is what. But whether or not it’ll be a healthy standard for me and my buddy is another agenda to be discussed.
So what’s your standard CSS structure like?
Comments
Have something to say? Leave a comment


