How do I tile it horizontally on the x axis in the css

Discussion in 'CSS' started by vwdforum, Jun 2, 2008.

  1. #1
    Hello

    I've been given a image graphic and I've been told

    Can anyone explain how to do this please?

    thanks

    Mally
     
    vwdforum, Jun 2, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    You set the image in the background and repeat across. Using the body element for the example:
    
    body {
      background: white url(some.jpg) repeat-x;
      }
    Code (markup):
    With more specific info, the answer can be more specific.

    cheers,

    gary
     
    kk5st, Jun 2, 2008 IP
  3. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #3
    Building on what Gary said:

    To repeat a background across the page: repeat-x
    To repeat a background down the page: repeat-y
    To only put the background once: no-repeat
     
    rochow, Jun 2, 2008 IP