Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap footer - How to align it to the right and give spacing

This is my code:

<footer>
        <p>© Company 2014</p><a href="#">Pricing</a><a href="#">Contact</a><a href="#">Terms</a>
</footer>

I'm trying to not only align the links to the right but also give each one a spacing so they are not directly next to each other.

I know I can float it right and give it isn't own CSS but im trying to avoid using custom CSS, is there any css classes or html markup I can add from bootstrap to get this effect without having to add custom rules?

like image 781
J.Zil Avatar asked Jul 24 '14 13:07

J.Zil


People also ask

How do I align something to the right in bootstrap?

Using . align-self-end is used to align a single item in a Flexbox to the right.

How do I align items in footer?

Try this CSS: . footer_content { border-top: 1px solid #1F2024; clear: both; float: left; margin: 30px 30px 0; padding: 20px 0 0; width: 940px; text-align: center; // Align both elements horizontally } table.

How do you right align a footer in HTML?

HTML | <tfoot> align Attribute left: It sets the table footer text left-align. right: It sets the table footer text right-align.

How do I move the text to the right side in bootstrap?

You can simply use the class . justify-content-between in combination with the class . d-flex to left align and right align text content within a <div> container in Bootstrap 4.


1 Answers

See Bootply for a working example.

    <footer>
      <p class="pull-left">© Company 2014</p>
      <div class="pull-right">
          <ul class="list-inline">
             <li><a href="#">Pricing</a></li>
             <li><a href="#">Contact</a></li>
             <li><a href="#">Terms</a></li>
          </ul>
      </div>
    </footer>

The list-inline utility places everything in a single line using inline-block with extra padding. It is a Bootstrap utility.

like image 182
Aibrean Avatar answered Sep 24 '22 17:09

Aibrean