0

I have a jsfiddle included. This is really just fooling around, but i can't get this background to stretch the entire viewport. I think it has to do with the background being 1000px wide stated in the jQuery script, which would make sense. But setting the divs to 100% w/h is not working to stretch that image.

jsfiddle

Just a heads up: there is basically a large gradient i want that is scrolling the page and restarting (the jquery does that) and there is an overlay on top of it that gives it a nice effect.

Div overlay is quite simple:

<div id="wrapper">
    <div id="container">
        <div id="overlay" class="png-fix">
        </div>
    </div>
</div>

Thanks a lot crowd!

Corey
  • 45
  • 8

2 Answers2

1

Please check Background images: how to fill whole div if image is small and vice versa

There are a lot of ways to do this. I recommend you research before asking a question.

Community
  • 1
  • 1
Hozikimaru
  • 1,144
  • 1
  • 9
  • 20
  • Embarrassing really lol. So easy i knew the answer, i need sleep. Thanks for the help.. – Corey Apr 26 '14 at 22:09
0

This is also a simple and dynamic solution:

background: url(yourimagepath) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;