Writing better, efficient, structured, and hand written CSS

For everything in this world there are some limitations, rules, guidelines etc… Like that we have for HTML & CSS too. A standard format and syntax that everyone understands. A developer, programmer, engineer should follow these and we do. Everyone will have their own style and its a god gift, know one can do same like you and no one can be replaced in your place.

psd to css

CSS has given an unmatched flexibility. Its a marvelous language for creating web pages. Writing HTML & CSS that others can understand is a good idea but how you do this? Lets note out some of them here in this article.

Start with a CSS Reset file where its called “Backbone of a Website” Following frameworks & grid systems is easy, extremely important. We have 960gs and blue print etc…

Always keep in mind that you are not the one who will be working on that file for a life time.

Comments Are King! commenting, naming are pretty important for a file, which makes others to know what is what, this is an excellent way to show off.

Indent your css rules for easier scanning. Write a separate CSS file for Hacks.

Implementing shorthand CSS for example border, padding, margin, background, font etc…

Naming the Classes & ID’s is very important. Anyone should understand your naming methods, don’t write css like red-text, white-text etc…

Case Sensitive. Should not write like #Header, #Footer etc… all css file everything should be in small letters.

Importing CSS files with a one line is easiest way, rather than calling all css files one by one in HTML files.

Minify’ing CSS is not a good idea – Of course the file size may reduce and this is highly recommended for highly visited websites. But a developer cant understand it. Sometimes when we inspect the pages to know the CSS of that particular part the inspector shows it some where which is in 1 line. Editing process will take time. You need to minify the CSS when you are completely done with writing CSS for that project.

Writing a CSS which gives a browser compatible site is utmost important. Experience Matters for writing CSS i agree. But follow these rules you will be a rock-star in a short period of time. We at Designing Studios have real time experience in CSS developed 1000+ websites and its going on. Reach us if you have any questions.

BYW Please do let us know your style.

Comments are closed.