How can I achieve a flexible background image?

Discussion in 'Web Design and Development' started by HarryPot, Jun 28, 2011.

  1. HarryPot macrumors 6502a

    Joined:
    Sep 5, 2009
    #1
    I want to achieve something like the white box were all the content is in this page from Apple: http://www.apple.com/iphone/features/

    Right I've been unable to make something work. I would appreciate any help.

    Thanks.:)
     
  2. manueld macrumors 6502

    Joined:
    Jun 8, 2009
    #2
    That's just a repeating background on the container...i'm not quite sure what you're asking and mean by "flexible".
     
  3. IgnatiusTheKing macrumors 68040

    IgnatiusTheKing

    Joined:
    Nov 17, 2007
    Location:
    das Fort
    #3
    Yeah like manueld said, you need to make an image that is the full width of what you want, set it as the background of your div, and make it repeat vertically (meaning, along the Y axis).

    Your CSS will look something like:

    #container {background-image: url(images/bkgd.jpg); background-position: 0px 0px; background-repeat: repeat-y; width: 900px; margin: 0 auto;}
     

Share This Page