Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Gradients in CSS

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #158613
    verschha
    Participant

    I’ve a requirement to have a background using gradients. After some searching I found this:

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#9B9B9B',GradientType=0); /* For IE6 - 9 */
    background: -webkit-linear-gradient(#FFFFFF, #9B9B9B); /* For Safari */
    background: -o-linear-gradient(#FFFFFF, #9B9B9B); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(#FFFFFF, #9B9B9B); /* For Firefox 3.6 to 15 */
    background: linear-gradient(#FFFFFF, #9B9B9B); /* Standard syntax (must be last) */
    Although this looks good, it should be a bit more specific, The top 150 pixels should be white, the next 200 pixels a gradiĆ«nt from #FFFFFF’ to #9B9B9B, the next 200 pixels a gradiĆ«nt from #9B9B9B’ to #FFFFFF and below that everything should be white.

    Can, and if so, how can this be done? Note that it should work on all browsers!

    #158616
    alexmccabe
    Participant

    Create your gradient using this, then change the % values to px values. Done.

    #158719
    verschha
    Participant

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.