Problem Repeating A Background Image Vertically

Discussion in 'CSS' started by bad_bob00, Jan 25, 2008.

  1. #1
    Hi there,

    On a website I'm working on I have got a div which runs down the left hand side of the page, which is a repeated background image.
    In the div I have another image shown at the top (a gradient image) and below if I want to show the background image repeated vertically.

    The problem is that I don't know how to allow the background image to repeat to the bottom of the page - as there is no text or content in that div. I could set a height to the div in pixels, but I thought that this might look strange on certain browsers/resolutions.

    How can I get the background image to repeat in the div, to the bottom of the page? :confused: I tried the repeat-y command but it doesn't seem to work (I don't think it knows how big the website is, so doesn't know how long to repeat itself for...)


    Thanks for any help.
     
    bad_bob00, Jan 25, 2008 IP
  2. humanedited

    humanedited Peon

    Messages:
    747
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you send a link to the site you're working on?

    If you want the image to tile from top to bottom like a left column, why don't you just set it as a body background?
     
    humanedited, Jan 25, 2008 IP
    bad_bob00 likes this.
  3. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #3
    But would the website know what the size needs to be? Sorry, it is hard to explain.

    Here is a screenshot of the problem:
    [​IMG]


    Thanks
     
    bad_bob00, Jan 25, 2008 IP
  4. humanedited

    humanedited Peon

    Messages:
    747
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    the image isn't loading for me right now but I'll take a look when I get back from my lunch break.
     
    humanedited, Jan 25, 2008 IP
  5. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Okay thanks for trying to help out anyway.

    Is really annoying me, seems like a really simple problem but I don't have a clue how to sort it out.
     
    bad_bob00, Jan 25, 2008 IP
  6. humanedited

    humanedited Peon

    Messages:
    747
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    So the site is fluid, not a fixed width, right?
     
    humanedited, Jan 25, 2008 IP
  7. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #7
    I think that the site has a fixed width.

    I need the background image to be repeating downwards though.


    Thanks
     
    bad_bob00, Jan 25, 2008 IP
  8. ChaosFoo

    ChaosFoo Peon

    Messages:
    232
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You could probably get a pretty good answer if you were to post your code, or better yet, a link to where we can view it.

    Based on what I understand you are saying, it shouldn't be too hard, but I don't think I'm grasping what you are getting at.
     
    ChaosFoo, Jan 25, 2008 IP
  9. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #9
    Problem is sorted now, thanks for the help (reps given to humanedited for helping me out) :)

    Thanks for trying to help ChaosFoo.
     
    bad_bob00, Jan 25, 2008 IP