Friday, February 25, 2011

Fade Image Into Another (within a Sprite)

Creating an image rollover is pretty easy with CSS. Give the element a background-image, then on it's :hover, change the background-image. It's best practice to combine both images into one and shift the background-position rather than use two separate images, that's the idea of CSS sprites. But what if you want to fade one image into another, not just have an abrupt shift?

The solution there is to create an additional element on top of the original with zero opacity and the background-position already shifted into place. Then on the :hover, fade in the opacity. Here are three ways to do that, using a little arrow graphic.

Read More :

Checkerboard, striped & other background patterns with CSS3 gradients

You’re probably familiar with CSS3 gradients by now, including the closer to the standard Mozilla syntax and the ugly verbose Webkit one. I assume you know how to add multiple color stops, make your gradients angled or create radial gradients. What you might not be aware of, is that CSS3 gradients can be used to create many kinds of commonly needed patterns, including checkered patterns, stripes and more

Article Source:

Sunday, February 13, 2011

The Power of CSS’s Automatic Numbering

CSS is great for styling your website, but did you know it can do math? Of course it can! When you define an ordered list who do you think keeps track of the numbers? It’s built into CSS!

<li>Opening Scene</li>
<li>Boy Meets Girl</li>
<li>Boy Looses Girl</li>
<li>Boy Fights Opponents
<li>The Wrestler</li>
<li>The Engineer</li>
<li>Captain Doom</li>
<li>Everybody Lives Happily Ever After</li>

Article Source:

Wednesday, February 9, 2011

The Shapes of CSS

Rendering shapes with CSS

Try with the below css properties to get the OVEL shape

CSS Code

<style type="text/css">

#ovalShape {
-moz-border-radius:100px / 50px;
-webkit-border-radious:100xp / 50px;
border-radius:100px / 50px


<div id="ovalShape" ></div>