a few words about web development

Gradient-filled colorful boxes - in CSS

Another straight to the point solution
Want to make a nice gradient colored box without using ugly background images? Just apply this set of rules to any element, like DIV:

background-color: #00FF00;
background-image: -moz-linear-gradient(top, #00FF00, #FFFF00); /* Firefox */
background-image: -ms-linear-gradient(top, #00FF00, #FFFF00); /* IE10 */
background-image: -o-linear-gradient(top, #00FF00, #FFFF00); /* Opera  */
background-image: -webkit-gradient(linear, left top, left bottom, from(#00FF00), to(#FFFF00)); /* Safari/Chrome */
background-image: -webkit-linear-gradient(top, #00FF00, #FFFF00); /* Chrome 10/Safari5 */
background-image: linear-gradient(top, #00FF00, #999999);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#00FF00', EndColorStr='#FFFF00'); /* IE8 */

The result:

Comments