.pagination-outer{ text-align: center; } .pagination{ font-family: 'Poppins', sans-serif; display: inline-flex; position: relative; } .pagination li a.page-link{ color: #000; font-size: 20px; font-weight: 500; line-height: 28px; height: 30px; width: 45px; padding: 0; margin: 0 6px; border-radius: 3px; border: none; border: 2px solid #999; overflow: hidden; position: relative; z-index: 1; transition: all 0.3s ease 0s; } .pagination li:first-child a.page-link, .pagination li:last-child a.page-link{ font-size: 25px; line-height: 25px; } .pagination li a.page-link:hover, .pagination li a.page-link:focus, .pagination li.active a.page-link:hover, .pagination li.active a.page-link{ color: #fff; background-color: transparent; border: 2px solid #FC427B; } .pagination li a.page-link:before, .pagination li a.page-link:after{ content: ''; background-color: #B33771; height: 100%; width: 0; position: absolute; left: 0; top: 0; z-index: -1; transition: all 0.4s ease 0s; } .pagination li a.page-link:after{ background-color: #FC427B; transition: all 0.4s ease 0.1s; } .pagination li a.page-link:hover:before, .pagination li a.page-link:focus:before, .pagination li.active a.page-link:hover:before, .pagination li.active a.page-link:before, .pagination li a.page-link:hover:after, .pagination li a.page-link:focus:after, .pagination li.active a.page-link:hover:after, .pagination li.active a.page-link:after{ width: 100%; } @media only screen and (max-width: 480px){ .pagination{ font-size: 0; display: inline-block; } .pagination li{ display: inline-block; vertical-align: top; margin: 10px 0; } }