Simple cross-browser gradients

The following is a snippet for making simple (linear, two-colour) cross-browser gradients:

/* IE6 & IE7 */
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbcf4b', endColorstr='#fabc01');
/* IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbcf4b', endColorstr='#fabc01')";
/* webkit: Safari and Chrome */
 background: -webkit-gradient(linear,left top,right bottom,from(#fbcf4b),to(#fabc01));
/*Firefox*/
 background: -moz-linear-gradient(top, #fbcf4b, #fabc01); 

jQuery basics: adding a class

It’s simple to add a class to any tag in jQuery, the following adds a class to the first paragraph:

$("document").ready(function() {
	$("p:first").addClass("green");
	});

See the example.

Sticky Footer and the 960 grid

Lately every site WordPress site I build uses the 960 grid (I know, I know…CSS frameworks are bad, but a client wants a site in a week flat…things happen!)

I have been using this really great sticky footer code from:

http://www.cssstickyfooter.com/

But it never seems to work right in Safari UNLESS I omit the following line:

So there you go. Get rid of the text.css file and you’re good to go. This is bit of “extra” css in the 960 grid and seems to interfere the most with my own css anyhow.