CodePen

HTML

            
              <div id="main_contain">
  
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              #main_contain {
width:940px;
min-height:100px;  
padding:0 130px;
margin:0 auto;

background-position:top center;
background-repeat:no-repeat;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              function randomize() {
  var images = ["http://sustainabuildingbelize.com/images/bgimages/1.jpg",
                "http://sustainabuildingbelize.com/images/bgimages/2.jpg",
                "http://sustainabuildingbelize.com/images/bgimages/4.jpg",
                "http://sustainabuildingbelize.com/images/bgimages/5.jpg"];
  var imageNum = Math.floor(Math.random() * images.length);
  document.getElementById("main_contain").style.backgroundImage = "url('" + images[imageNum] + "')";
}

window.onload = randomize();
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................