Discover useful code snippets with CSS-Tricks Code Snippets Gallery
Code Snippets Gallery from CSS-Tricks has a nice collection of really useful code snippets.
We all know that CSS-Tricks is one of the most useful websites out there to learn about CSS tips and tricks. For those of you who has some exposure to CSS-Tricks would remember those wonderfully useful screencasts by Chris Coyier. On top of everything useful at CSS-Tricks they’ve even put out a Code Snippets Gallery section where you can discover code snippets that would be absolutely useful in your day-to-day web development work.

Code Snippets Gallery hosts code samples that are really simple in nature but are terribly useful for most of the common programming job. The code snippets are grouped into,
- CSS
- htaccess
- HTML
- JavaScript
- jQuery
- PHP
- WordPress

The code snippets include a wide range of common scenarios, like for example,
- Center DIV with dynamic height
- Cross Browser hr styling
- Fixed Footer
- PNG fix for IE6
- Remove file extensions from URLs
- Embedding Flash
- Meta tag to force IE8 to behave like IE7
- The common DOCTYPES
- Auto-select textarea
- Modern JavaScript Event Handling
- Prevent background image flickering in IE
- Check if jQuery is loaded
- Equalize heights of DIVs
- Persistent headers on tables
- Simple jQuery Accordion
- Create URL Slug from post title
- Display a user Gravatar from email address
- Get users IP address
- Intelligent PHP Cache Control
- Server side image resizer
- And much more…
You must have got a feel of how much those code snippets would be helpful.

If you use Textmate or Coda as your code editor you can directly import these code snippets directly into those code editors. Even though it’s not a big deal it’s a slight convenience factor.
Overall, Code Snippets Gallery is a fantastic place to find out about many of the most commonly use code snippets. I hope Chris keeps the Code Snippets Gallery more and more up to date so it can be one of the most useful tool for web developers.
Visit Code Snippets Gallery on CSS-Tricks.


