Forums

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

Home Forums CSS 2 color abckground

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #29591
    eXo
    Member

    In the button maker( https://css-tricks.com/examples/ButtonMaker/ ).
    You can select a "Top gradient color" and a "Bottom Gradient color", can you also do this for a background?

    #79463
    virtual
    Participant

    On a background you can make a long thin image with a gradient from top to bottom, then in the css you make the background color the same as the bottom of your gradient and place your background image to repeat-x. Does that make sense to you? ;)

    #79472
    eXo
    Member

    Yes that makes sense to me, i also did it a couple of times like that.
    But i was wondering if you could do that with only css?

    #70537
    jamygolden
    Member

    Yes, you can:

    Code:
    body{
    background-color: #1a82f7;
    background-image: -moz-linear-gradient(100% 100% 180deg, #2F2727, #1a82f7) !important;
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1a82f7), to(#2F2727)) !important;
    }
    #79690

    Yes you can use the gradient background color in css itself,

    <body style="filter:progid:DXImageTransform.Microsoft.Gradient
    (endColorstr=’#003366′, startColorstr=’#55aaee’, gradientType=’0′);">

    But this gradient background will works only in IE Browsers :D

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