2016-04-11 16 views
0

Meine Fußzeile sitzt aus irgendeinem Grund auf der rechten Seite der Seite. Ich kann nicht herausfinden, was es verursacht. HierBootstrap 3 - Footer sitzt auf der rechten Seite

enter image description here

ist die 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; } 

    } 
} 

Ich würde padding hinzufügen, wenn es nur Leerraum auf der linken Seite war es aber tatsächlich wird gedrückt das Recht, das die Seite breiter macht als es sein sollte und die Fußzeile der Mitte wirft.

+0

Können Sie eine codepen/jsfiddle machen zu normalisieren? versuche, 'left: 0' hinzuzufügen um mit – NooBskie

+0

zu beginnen' left: 0' hat funktioniert. Keine Ahnung, was das ist oder warum es funktioniert hat. Wenn Sie es als Antwort posten können, gebe ich es Ihnen. – Rob

Antwort

1

hinzufügen left: 0;-.footer Layout

.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; } 

    } 
} 
Verwandte Themen