Wednesday, October 12, 2011

CSS Gradient Backgrounds for Dividers


















Until IE 9 you were not able to use gradients in IE. Only mozilla based browsers supported them.









To make gradients configure your style sheet to use these lines;

background: #999; /* for non-css3 browsers */

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */



The three lines I just mentioned will gradiate your background on most browsers. Try it and see what I mean.

No comments:

Post a Comment

Programming for the Web