0

I'm fairly new to webdesign, so I think I have a rookie question. Searched on Google, found no solution.

I'm trying to create a parallax scrolling website. My friend gives me an image, this should be the background of the website. The image is approx 1920px * 10800px. I need to find how to set this as a background. The image should be entirely displayed, so the image-width should fill the screen, height should scale automatically. I can't set a height property, because I don't know what the height will be. How can i do this?

Kornelito Benito
  • 1,067
  • 1
  • 17
  • 38

1 Answers1

1

Hopefully this will answer your question. To reiterate,

#my_container {
    background-size: 100% auto; /* width and height, can be %, px or whatever. */
}
Community
  • 1
  • 1
jcage
  • 651
  • 6
  • 14