title: Keeping several Divs centered inside a container. Also Footer stuck in middle
body: <p>I realise this question has cropped up a few times here but I cannot seem to find a resolution to my specific problem. I am currently building a photography website, although taking me a long time, its coming along ok. I dont usually ask too many questions, instead searching for answers, but this one is driving me mad. I am very new to web building and consider myself a complete novice.</p>
  
  <p>Now I have a main 'Photo' page that will link to galleries, in this page I will have large tumbnails with some fancy CSS3 effects on them.</p>
  
  <p>In this page I have created 6 divs that will contain these large thumbnails, what I need them to do is reposition when the screen is reduced (Or displayed on smaller res displays etc) Now the img containers do in fact reposition when displayed on a smaller device but what I am struggling to achieve is keeping the 6 divs centered in the middle of the screen.</p>
  
  <p>The last solution I tried was "display: inline-block" Also the containing div's height does not seem to expand with the content.  I guess there is a bit missing here so would appreciate any suggestions and help given.</p>
  
  <p>I have not looked in depth into the footer issue yet but any help on that would also be great. The problem is that it was just positioned at the bottom of the page (What I though was sticky) but now that the page has enough content to scroll it just stays where it is.</p>
  
  <p>Any other help and comments on the website as a whole are very welcome :o) Many thanks in advance!!</p>
  
  <p>The page in question <a href="http://www.russfrancis.co.uk/photo" rel="nofollow">russfrancis.co.uk/photo</a></p>
  
  <p>Please see the following markup and CSS:</p>
  
  <p>Photo Markup:</p>
  
  <pre><code>&lt;div class="photomain"&gt;
    &lt;div class="containerwrapper"&gt;
      &lt;div class="photoimgcontainer"&gt;
        &lt;div class="view view-second"&gt;
          &lt;img src="images/photo/tn/asialg.jpg" /&gt;
        &lt;div class="mask"&gt;&lt;/div&gt;
        &lt;div class="content"&gt;
          &lt;h2&gt;Asia&lt;/h2&gt;
          &lt;p&gt;In 2008 I spent 6 months backpacking around Asia.&lt;/p&gt;
          &lt;a href="asia.htm" class="info"&gt;View The Galleries&lt;/a&gt;
        &lt;/div&gt; &lt;!-- Content Close --&gt;
        &lt;/div&gt; &lt;!-- View-second close --&gt;
      &lt;/div&gt; &lt;!-- Img Container Close --&gt;
        &lt;div class="photoimgcontainer"&gt;
        &lt;/div&gt;
        &lt;div class="photoimgcontainer"&gt;
        &lt;/div&gt;
        &lt;div class="photoimgcontainer"&gt;
        &lt;/div&gt;
        &lt;div class="photoimgcontainer"&gt;
        &lt;/div&gt;
        &lt;div class="photoimgcontainer"&gt;
        &lt;/div&gt;
      &lt;/div&gt; &lt;!-- Container Wrapper Close --&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.photomain{
  width: 90%;
  height:auto;
  margin: 130px auto 0;}
  
  .containerwrapper{
  display:inline-block;
  height:auto;}
  
  .photoimgcontainer{
  background-color:rgba(19,19,19,1);
  width: 535px;
  height: 360px;
  float:left;
  margin: 5px 5px;}
  </code></pre>
  
  <p>Footer Markup:</p>
  
  <pre><code>&lt;footer&gt;
    &lt;div class="footdiv"&gt;
      &lt;p align="center"&gt;Follow Me&lt;/p&gt; 
      &lt;div class="footimg"&gt;
       &lt;a href="https://www.facebook.com/RussFrancisPhotography" target="_blank"&gt;&lt;img src="images/facebook.png" width="40" height="40" border="0" alt="RFP Facebook Page"&gt;&lt;/a&gt;
       &lt;a href="http://www.flickr.com/photos/russfrancisphotography/" target="_blank"&gt;&lt;img src="images/flickr.png" width="40" height="40" border="0" alt="Russ Francis Flickr"&gt;&lt;/a&gt;
       &lt;a href="http://vimeo.com/lucidskies" target="_blank"&gt;&lt;img src="images/vimeo.png" width="40" height="40" border="0" alt="Vimeo - Lucid Skies"&gt;&lt;/a&gt;
       &lt;a href="https://twitter.com/R_F_Photo" target="_blank"&gt;&lt;img src="images/twitter.png" width="40" height="40" border="0" alt="Russ Francis - Twitter"&gt;&lt;/a&gt;
      &lt;/div&gt; 
   &lt;/div&gt;
   &lt;p class="pleft"&gt;&amp;copy; Russ Francis Photography 2012&lt;/p&gt;
   &lt;div class="pright"&gt;&lt;a href="#"&gt;Contact Me&lt;/a&gt;&lt;/div&gt;
  &lt;/footer&gt;
  </code></pre>
  
  <p>Footer CSS:</p>
  
  <pre><code>footer {
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  color:#FFF;
  position:absolute;
  left: 0;
  bottom: 0;
  height: 115px;
  width: 100%;}
  
  .footdiv p {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(153,0,0,1);}
  
  .footdiv {
  margin: 0 auto 0;   
  width:200px;
  height:60px;}
  
  .footimg {
  padding-left: 14px;}
  
  .pleft {
  padding-left: 10px;
  color:#999;
  font-size:12px;
  float:left;}
  
  .pright {
  font-size:15px;
  padding-right: 20px;
  float:right;}
  
  .pright a {
  color:#FFF;
  text-decoration:none;}
  </code></pre>