1
I am with a project that was developed in the version Bootstrap v4.0.0-alpha.4. In this project has a pagination that follows the standards of the framework.
<nav aria-label="Navegação de página exemplo">
<ul class="pagination">
<li class="page-item"><a class="page-link" href="#">Anterior</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Próximo</a></li>
</ul>
</nav>
The problem is in the alignment, because when I use the so:
<nav aria-label="Navegação de página exemplo">
<ul class="pagination justify-content-end">
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Anterior</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Próximo</a>
</li>
</ul>
</nav>
It doesn’t work... but if I withdraw:
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
And put:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
Works, but shits the whole layout :(
I’ve tried using the pull-right
and the text-right
, but it didn’t help.
Unfortunately it is the maintenance of a ready project and with this I cannot change the current structure. How can I align the pagination to the right side without impacting the layout?
You already tried to put it in the hand
.pagination {
 justify-content: flex-end !important;
 }
Bootstrap has a strong hierarchy of classes and sometimes it is necessary to use theimportant
– hugocsl
Hugo ball show. I implemented in your code
display: flex;
and it worked. Thank you!– user24136
Cool Fox.11 I’m glad it worked out! I left the most complete answer if you want to accept it and not leave your question open as Unanswered and we have already reached a solution. :)
– hugocsl