I'm using Laravel pagination with ->render() or ->links() method. Everything it's fine, the only problem is with my current active page, doesn't matter is is the first one, the second one or the last page, if is the active page the style doesn't work properly. Here is an example of my problem.
Searching for a solution to my problem I can see that the selected page number has and "active" class added. Searching on my css files (from coreui free template)
I found the following styles:
.page-item.active .page-link,
.pagination-datatables li.active .page-link,
.pagination li.active .page-link,
.page-item.active .pagination-datatables li a,
.pagination-datatables li .page-item.active a,
.pagination-datatables li.active a,
.page-item.active .pagination li a,
.pagination li .page-item.active a,
.pagination li.active a {
z-index: 2;
color: #fff;
background-color: #20a8d8;
border-color: #20a8d8;
}
Here is the HTML output my the render()
function:
<ul class="pagination">
<li><a href="http://localhost:8000/productos?page=1" rel="prev">«</a></li>
<li><a href="http://localhost:8000/productos?page=1">1</a></li>
<li class="active"><span>2</span></li>
<li><a href="http://localhost:8000/productos?page=3">3</a></li>
<li><a href="http://localhost:8000/productos?page=3" rel="next">»</a></li>
</ul>
What could be the problem?