Add gradient to website background image ?

Discussion in 'HTML & Website Design' started by Raynor152, Dec 26, 2007.

  1. #1
    How do I add a gradient to a websites background image ? Ok... i guess I can do it using a background image but wouldn't that image be huge ? I what a efficient method, one that can be applied to long page. For example on this website : http://sclegacy.com/ they use a black-blue background gradient. How can I do that without using a lot of bandwidth ?
     
    Raynor152, Dec 26, 2007 IP
  2. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Make a small image and repeat it.

    For example I have this image repeated by the x axis to create the effect on my site.
     
    twistedspikes, Dec 26, 2007 IP
  3. wdstuff54

    wdstuff54 Well-Known Member

    Messages:
    639
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Hey, What you do is make a very small image i.e. if it is a gradient horizontal then make it whatever height you need and then just make the width 1px and have it repeat as the background. If it is vertical then the opposite. If you need more of a explanation you can PM me.

    Good luck.
     
    wdstuff54, Dec 26, 2007 IP
  4. Raynor152

    Raynor152 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    Got it :) That was simple :) Thx
     
    Raynor152, Dec 26, 2007 IP
  5. wdstuff54

    wdstuff54 Well-Known Member

    Messages:
    639
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    110
    #5
    No problem. Enjoy:)
     
    wdstuff54, Dec 26, 2007 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Only one thing you might want to watch out for-- if the gradient is in some small box, 1px is great. However, going across the whole width of a large screen like mine means the browser has to repeat that 1px a gazillion times. In this case, I'd make that png or gif something like 10px wide just to ease browser rendering. Not that you'll ever ever see a time difference : )
     
    Stomme poes, Dec 27, 2007 IP