Home

Design News:

Clean and Optimized CSS Code

Some wonderful pointers on how to optimize your CSS code and also become more efficient in creating yout style sheets. These are great examples I even go by!

Comments (4)

Wondering if anyone has ever compressed their style sheets?
I mean does the size really matter that much?? I do keep my css clean but i’m not a css-tidy nazi as mat would put it, I might add some extra white space here and there and the likes, and as or shorthand, i must admit, I dont do it much…but I cant say ive seen negative results because of that? so what gives? am I missing something?

#1: Moni on 08/19 at 01:23 PM

Oh, something i always do though is document my code, has proved to be a life savor in the past! specially when i go back to a really old site that I have no recollection of at all

#2: Moni on 08/19 at 01:25 PM

I’ve never found it necessary to compress the CSS files, using instead, gz compression settings in IIS /Apache.

I HAVE on occasion, obfuscated the CSS and HTML + Javascript, by running them through a tokenizer I wrote. (all CSS classes get resolved to a 16 digit hex string) all Javascript functions and variables get scrambled.

why? the obvious reasons, also just to play with some C# code

#3: mark on 08/19 at 08:34 PM

Yeh never compressed, really not that necessary but always document my HTML and CSS.

I nearly posted this myself then realised you’d already done it! It is useful stuff to know.

#4: Nathan Beck on 08/20 at 12:07 PM
Commenting is not available in this weblog entry.

News Tools &
Other Resources

CSS Compressor

Use this tool to compress your CSS code, with three levels of compression to choose from!

CSS AutoPrefixer

Intelligently add CSS vendor prefixes to your CSS code. Just paste and copy!

Image to Color Palette Generator

Get the primary colors of any image in hex format with this online tool!

Image Optimizer

Use this tool to easily optimize regular gifs, animated gifs, jpgs, and pngs, so they load as fast as possible.

Button Maker

Use this tool to easily create those popular 80x15 micro buttons you see on web sites everywhere.

FavIcon Generator

Generate a favicon using any regular image with this tool. A favicon is a small, 16x16 image that is shown inside the browser's location bar and bookmark menu when your site is viewed.

Ribbon Rules Generator

Create alternating colored horizontal rules quickly with this new Web 2.0 tool.

.htaccess Banning Generator

Generate the necessary .htaccess code to ban visitors based on their IP address, referrals, or disable hotlinking on the desired file types on your server, such as images.

.htaccess Password Generator

Generate all the necessary codes needed to password protect a directory or selects files within it on your site using .htaccess.



Partners & ResourcesOur
Partners


CSS Forums News

Dynamic Drive forums | Register

The Latest Comments

All images and content copyright © 2017 CSS Drive. Contact Info | Back to Top
Affiliate Discloser: We receive a commission from purchases through some links on this site