css - HTML Footer on Bottom under all content -


im trying footer on bottom of page, got part on bottom of page, overlapping content area called"portfolio list" looks now: enter image description here

as can see footer overlapping bottom part of portfolio list. css part:

.container {      position: relative;      width: 1000px;      margin: 0 auto;      -webkit-transition: 1s ease;   -moz-transition: 1s ease;   -o-transition: 1s ease;   transition: 1s ease;   } #portfoliolist .portfolio {     -webkit-box-sizing: border-box;     -moz-box-sizing: border-box;     -o-box-sizing: border-box;     width:31%;     margin:1%;     display:none;     float:left;     overflow:hidden; }      .portfolio-wrapper {         overflow:hidden;         position: relative !important;         background: #666;         cursor:pointer;      }      .portfolio img {         max-width:100%;         position: relative;     }      .portfolio .label {         position: absolute;         width: 100%;         height:40px;         bottom:-40px;     }          .portfolio .label-bg {             background: #121212;             width: 100%;             height:100%;             position: absolute;             top:0;             left:0;         }          .portfolio .label-text {             color:#fff;             position: relative;             z-index:500;             padding:5px 8px;         }              .portfolio .text-category {                 display:block;                 font-size:9px;             }   footer{     position:absolute;      bottom:0;     width:100%;     height:100px;   /* height of footer */     background:#121212;  } 

html:

<div id="portfoliolist">               <?php                 while($query->fetch()):                    echo "<a href='post.php?id=$post_id'>"?>             <div class="portfolio <?php echo $category?>" data-cat="<?php echo $category?>">                 <div class="portfolio-wrapper">                               <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'" />';?>                         <div class="label">                             <div class="label-text">                                 <a class="text-title"><?php echo $title?></a>                                     <span class="text-category"><?php echo $category?></span>                             </div>                                 <div class="label-bg"></div>                         </div>                 </div>             </div>             <?php   echo "</a>";                     endwhile;?>             </div>              <footer>                 <div class="footer-nav">                 <ul>                     <li><a href="#">facebook</a></li>                     <li><a href="#">twitter</a></li>                     <li><a href="#">deviantart</a></li>                     <li><a href="#">behance</a></li>                     <li><a href="#">linkedin</a></li>                 </ul>                 </div>             </footer> 

both of these div's in container. hope can me out!

try footer { position: relative; } matej Đaković said. it's important, #portfoliolist clears float of .portfolio, otherwise #portfoliolist has no height.

#portfoliolist:after {     content: ' ';     display: block;     clear: both; } 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -