5 Innovative CSS Techniques You Should Know About

We all love CSS but keeping up with the latest techniques can be quite difficult at times. So for your convenience, I’ve compiled five tutorials that showcase useful and innovative techniques that you should know about.



[Just to be clear, I know some form of probably all these techniques may have existed for awhile but I feel these five choices can still be used/improved upon by us developers and/or not fully adapted yet even though they are known by many to be productive. A bump and a nod, if you will.]

1. Perfect Full Page Background Image

by Chris Coyer of CSS Tricks

For a project I worked on in the past, I tried to implement a full page background image via CSS and it is much more difficult than you’d expect. First of all you’re dealing with the scaling issue (because we don’t want white space) and then you have the proportions to worry about and then on top of all that you have to deal with the scroll bars and browser compatibility issues.

Thankfully, Chris Coyer takes you through two techniques (albeit only one technique truly fulfills all the requirements above).

http://css-tricks.com/perfect-full-page-background-image/

2. CSS Sprites: Image Slicing’s Kiss of Death

by Dave Shea of A List Apart

If your “images” folder is about to burst because of the sheer quantity and complexity of its contents, we have a winner for you! CSS sprites are basically a grid of images in a single image file that you position and re-position as necessary. You do this to help your production efficiency as you only need to maintain a single file. This technique is an absolute godsend for navigation links states effects.

ALA all-star, Dave Shea outlined these techniques as far back as 2004 and re-visited the subject in 2008.

http://www.alistapart.com/articles/sprites/
http://www.alistapart.com/articles/sprites2/

3. How To Recreate Silverback’s Parallax Effect

By Paul Annett of Think Vitamin

I first saw Jeremy Keith show off the Silverback website at An Event Apart in San francisco last year (2008) and was blown away. Not so much because of how exciting it looked but more because of its elegant coolness factor. The parallax effect can basically be described as multiple background images set at individual visual levels to acheive a nice movement effect when the user changes the browser window size.

British developper, Paul Annett is responsible for the original implementation of this technique for Clearleft (who makes Silverback) and gives us a rundown of how he implemented it for them.

http://carsonified.com/blog/design/how-to-recreate-silverbacks-parallax-effect/

Other ways to accomplish this technique:
http://forthelose.org/examples-of-and-how-to-do-the-css-parallax-effect
http://webdev.stephband.info/parallax.html

4. CSS: Add a “Loading” Icon To Your Larger Images

by DynamiX Labs

The tricky thing about dealing with large images (or multitudes of images that hog bandwidth) is that during loading it can really mess with your layout and confuse your viewers until the image loads.
In other words – a bad first impression with your audience. To remedy this, use a preload image so that they know something is coming and they won’t be alarmed that the page is broken.

DynamiX Labs has a nice solution that is multi-browser compatible and requires no javascript.

http://www.dynamixlabs.com/2008/01/17/a-quick-look-add-a-loading-icon-to-your-larger-images/

5. Create a Lightbox Effect Only With CSS – no javascript needed (except to close the windows)

by Emanuele Feronato

I am an advocate of Lightbox, Greybox and the other jQuery options to achieve the pop-up effects for opening new windows within a webpage.
As they mature, the options for them become more and more impressive. However, sometimes all you need is a simple lightweight option that gets the job done for you without a whole lot of fuss. That’s the beauty of this mostly CSS solution (rudimentary javascript is used to close the window).

For a landing page project that I worked on that had a shelf-life of about a month, I decided to use this technique for a registration form and it worked out great. it was easy and fast to implement and had I appreciated the tiny footprint.

http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/

You may also find these articles useful:

3 Fresh Web Design Ideas
CSS Rehab – 3 Step Program To Getting Clean
Why I Love Expression Engine (CMS)

Did I Miss Something?! Let me know in comments!

8 Appreciated Comments to “5 Innovative CSS Techniques You Should Know About”

  1. Robert says:

    Nice list. Seems like the capabilities with CSS are never-ending.

  2. TypeSett says:

    @Robert – thanks, and I like your paper whistle blog too. Check it out everybody: http://paperwhistle.com/blog/

    First time I’ve seen VHS inspired art:
    http://paperwhistle.com/blog/2009/07/28/hollis-brown-thornton-vhs/

  3. stk says:

    LOL … I would advise you to learn about JavaScript and accessibility, before publishing a (short) list of “CSS Techniques You Should Know About”.

    Firstly, number five shouldn’t be on your list. It’s not a CSS technique. It relies completely on JavaScript.

    Secondly, not only does it rely on JavaScript, but visitors who don’t have JavaScript (or their JavaScript is borked) see nothing! It violates accessibility guidelines.

    Thirdly, the CSS and HTML used by the technique doesn’t validate (i.e., it’s not “web-standard” code).

    Fourthly, it fails in Internet Explorer version 6.

  4. TypeSett says:

    @stk – thanks for your comment, and I mean it. I know from the comments he gets on his website that his article is mis-named for sure. There is javascript and it’s used for handling some events and so forth and does depend on it. But It’s not an issue for me because it’s a lightweight solution and since I used it for a real project before, I have no problem including it on the list.

    Accessibility wise – you make a valid point but that’s up to the people making the website if they want to support Javascript. As for strict standards compliance… if that’s what you’re trying to achieve… take the concept and make it standards compliant.

  5. Dave Sparks says:

    Thanks, I always find it intriguing how many things that we have relyed on JavaScript for can actually be done with CSS.

  6. stk says:

    TypeSett -

    LOL … you must’ve visited Randsco.com before. ;-)

    I have improved the code I mentioned, making it accessible, XHTML/CSS valid, fixed IE6 (and other issues). Here’s the link (post isn’t finished yet, but the permalink IS valid and *will work* once it’s made public).

    http://randsco.com/index.php/2009/08/31/improving_an_easy_lightbox_effect

    Cheers,
    -stk

    PS – In the meantime, you can look at a demo of both the (hoping your comments accept anchor tags) original code and the improved code. (I’m fairly certain I’m done monkeying w/the code, just need to finish the write-up).

    PPS – Speaking of accessibility – tsk tsk for needing JavaScript to make comments on your site. :-p

  7. [...] This post was Twitted by joomblocks [...]

  8. [...] 5 innovative CSS Techniques You Should Know About [...]

Leave a Reply

Spam Protection by WP-SpamFree

 

"Recent Gems"

Sponsor

Sponsor