Copy link to clipboard
Copied
I cannot find how to make pagination active (and show different background color), and have the previous, next arrows work, or have the clicked button change colors. Also, when I try to add page 6 and 7, those pages won't work. will only take five pages.
here is my code:
<style>
<nav aria-label="Page navigation example">
<ul class="pagination ">
<li class="page-item"> <a class="page-link ml-2" href="#" aria-label="Previous"> <span aria-hidden="true">«</span> <span class="sr-only">Previous</span> </a> </li>
<li class="page-item"> <a class="page-link ml-2" href="Sewing_gallery_1a.html">
1</a></li>
<li class="page-item"> <a class="page-link ml-2" href="Sewing_Gallery_2a.html">2</a></li>
<li class="page-item"><a class="page-link ml-2" href="Sewing_gallery_3.html">3</a></li>
<li class="page-item"><a class="page-link ml-2" href="Sewing_gallery_4.html">4</a></li>
<li class="page-item"><a class="page-link ml-2" href="Sewing_Gallery_5a.html">5</a></li>
<li class="page-item"> <a class="page-link ml-2" href="#" aria-label="Next"> <span aria-hidden="true">»</span> <span class="sr-only">Next</span> </a> </li>
</ul>
</nav>
thanks for your help!!!
I cannot find how to make pagination active (and show different background color)
Add the active class to the item as in
add page 6 and 7, those pages won't work
Copy link to clipboard
Copied
I cannot find how to make pagination active (and show different background color)
Add the active class to the item as in
add page 6 and 7, those pages won't work
Copy link to clipboard
Copied
Bootstrap doesnt really do anything 'dynamic' so you probably won't be able to use the Next and Previous arrows/buttons if your hard-coding the url to the gallery pages. Just use the pagination numbers and manually apply the 'active' class to the appropriate <li> or <a> tag on each gallery page, as Ben has suggested, to 'mark' the current page the user is on.