CSS gradients in ALL browsers

http://robertnyman.com/2010/02/15/css-gradients-for-all-web-browsers-wit...

Linear Gradient, From Top =

<style>
        #gradient {
                color: #fff;
                height: 100px;
                padding: 10px;
                /* For WebKit (Safari, Google Chrome etc) */
                background: -webkit-gradient(linear, left top, left bottom, from(#00f), to(#fff));
                /* For Mozilla/Gecko (Firefox etc) */
                background: -moz-linear-gradient(top, #00f, #fff);
                /* For Internet Explorer 5.5 - 7 */
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF);
                /* For Internet Explorer 8 */
                -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF)";
        }
</style>

<div id="gradient">
        I haz gradient
</div>




Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
Bg