Background image repeat - How to position?

Discussion in 'CSS' started by Edz, Oct 2, 2006.

  1. #1
    Hi guys - I have this code:

    
    <html>
    <head>
    
    <style type="text/css">
    body
    { 
    background-image: 
    url('file:///C:/Documents%20and%20Settings/Eigenaar/Bureaublad/10.jpg');
    background-repeat: repeat-x
    }
    </style>
    
    </head>
    Code (markup):
    This code makes an image repeat itself over the x position but puts itself on top of the screen.

    What must i ad or change in order to make the image start repeating not from the top but let's say 100 pixels below from the absolute top of the screen?

    Thanks in advance guys.
     
    Edz, Oct 2, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Try
    
    background-position: center 100px;
    Code (markup):
    The first is the horizontal offset/position and the second is the vertical.

    cheers,

    gary
     
    kk5st, Oct 2, 2006 IP
    Edz likes this.
  3. Edz

    Edz Peon

    Messages:
    1,690
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Gary for your explanation although i am confused how to integrate this in the code i posted :confused:
     
    Edz, Oct 2, 2006 IP
  4. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    background: url('file:///C:/Documents%20and%20Settings/Eigenaar/Bureaublad/10.jpg') 0 100px repeat-x;

    See CSS Background.


    Edit: didn't see the other posts. Damn quick reply.
     
    penagate, Oct 2, 2006 IP
    Edz likes this.
  5. Edz

    Edz Peon

    Messages:
    1,690
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks Penagate! :cool: That worked for me.
     
    Edz, Oct 2, 2006 IP