<h1>Two-Elements Pagination</h1>
<p>Both elements at the "desktop" screen are distributed at the extremes.</p>
<p>At the "mobile" screen, both elements keep in the extremes, indicating at one extreme or another, the nature of the page it will be accessed.</p>
<div class="sample-container">
<div class="pagination">
<div class="previous">
<a href="#">
<i class="fas fa-angle-double-left fa-fw"></i> Previous Page
</a>
</div>
<div class="next">
<a href="#">
Next Page <i class="fas fa-angle-double-right fa-fw"></i>
</a>
</div>
</div>
</div>
<h1>One-Element Pagination</h1>
<p>The elements with the classes <code>.previous</code> and <code>.next</code> will be kept. It's the content of both, if we are on the first or the last page, which will be appearing or disappearing.</p>
<h2>Only Previous Pagination</h2>
<div class="sample-container">
<div class="pagination">
<div class="previous">
<a href="#">
<i class="fas fa-angle-double-left fa-fw"></i> Previous Page
</a>
</div>
<div class="next">
</div>
</div>
</div>
<h2>Only Next Pagination</h2>
<div class="sample-container">
<div class="pagination">
<div class="previous">
</div>
<div class="next">
<a href="#">
Next Page <i class="fas fa-angle-double-right fa-fw"></i>
</a>
</div>
</div>
</div>
body {
font-family: Arial;
}
.sample-container {
border: 1px solid black;
padding: 1rem;
}
.pagination {
display: flex;
}
.pagination a {
color: black;
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
}
.pagination a:hover {
opacity: 0.5;
}
@media screen and (max-width: 575px) {
.pagination {
flex-direction: column;
}
.pagination > *:not(:last-child) {
margin-bottom: 1rem;
}
.pagination .previous {
display: flex;
justify-content: flex-start;
}
.pagination .next {
display: flex;
justify-content: flex-end;
}
}
@media screen and (min-width: 576px) {
.pagination {
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}