Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2009
    Posts
    167
    Thanks
    15
    Thanked 1 Time in 1 Post

    can you have two different repeat-x background images in css?

    hello,

    a common practice in css is to have a background image repeat horizontally using repeat-x.

    i was wondering if you can set up two different background images. so the first one will repeat horizontally across the entire screen. then the second one will repeat horizontally across the entire screen under it. kind of like this:

    111111111111111111111111111
    222222222222222222222222222

    i'm looking at how to do this in a single tag environment, rather than setting up two separate divs.

  • #2
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    one image

    coloured say half red, half blue.

    Code:
    body { background:red url(image.jpg) repeat-x top; }
    top part of the "body" will be colour one, rest of the page will be colour two.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •