How can I achieve a flexible background image?

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

  1. HarryPot macrumors 6502a

    Sep 5, 2009
    I want to achieve something like the white box were all the content is in this page from Apple:

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

  2. manueld macrumors 6502

    Jun 8, 2009
    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


    Nov 17, 2007
    das Fort
    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