2016-04-11 15 views
0

Altbilgim sayfanın sağında bir nedenden dolayı oturuyor. Buna neyin sebep olduğunu anlayamıyorum. İşte Bootstrap 3 - Footer Sayfanın sağında oturuyor

enter image description here

HTML

<footer class="footer"> 
    <div class="container"> 
     <div class="navbar-social-accs pull-left"> 
     <nav> 
      <h4>Boring Links</h4> 

      <ul class="pull-left"> 
      <li> 
       <%= link_to "About", about_path %> 
      </li> 
      <li> 
       <%= link_to "Contact", contact_path %> 
      </li> 
      <li> 
       <%= link_to "Terms", root_path %> 
      </li> 
      <li> 
       <%= link_to "Privacy Policy", root_path %> 
      </li> 
      </ul> 
     </nav> 
     </div> 

     <div class="navbar-social-accs pull-right"> 
     <nav> 
      <h4>Follow Us!</h4> 
      <ul> 
      <li> 
       <%= link_to "About", about_path %> 
      </li> 
      <li> 
       <%= link_to "Contact", contact_path %> 
      </li> 
      <li> 
       <%= link_to "Terms", root_path %> 
      </li> 
      <li> 
       <%= link_to "Privacy Policy", root_path %> 
      </li> 
      </ul> 
     </nav> 
     </div> 
    </div> 
    </div> 
</footer> 

css

/* footer */ 

footer { 
    margin-top: 45px; 
    padding-top: 5px; 
    color: $gray; 
    a { 
    color: $black-gray; 
    &:hover { 
     color: $black-gray; 
    } 
    } 
} 

.footer { 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
    /* Set the fixed height of the footer here */ 
    height: 150px; 
    background-color: #f5f5f5; 
    ul{ padding:15px; 
    li { list-style-type: none; } 

    } 
} 

için solundaki sadece beyaz boşluk varsa ben dolgu eklersiniz ama aslında itilmiş ediliyor Sayfayı daha geniş kılan doğru olmalı ve merkezin altbilgisini atar.

+0

Bir codepen/jsfiddle yapabilir düzenini normalleştirmek ekle? – NooBskie

+0

' ile başlamak için sol: 0’ı eklemeyi deneyin: 0' çalıştı. Ne yaptığını ya da neden işe yaramadığını bilmiyorum. Eğer bunu bir cevap olarak gönderirseniz size vereceğim. – Rob

cevap

1

.footer için left: 0;

.footer { 
    position: absolute; 
    bottom: 0; 
    left: 0; /** Added **/ 
    width: 100%; 
    /* Set the fixed height of the footer here */ 
    height: 150px; 
    background-color: #f5f5f5; 
    ul{ padding:15px; 
    li { list-style-type: none; } 

    } 
}