.pagination-outer{ text-align: center; } .pagination{ font-family: 'Poppins', sans-serif; display: inline-flex; position: relative; } .pagination li a.page-link{ color: #269390; background: #f5f5f5; font-size: 22px; font-weight: 500; line-height: 40px; height: 40px; width: 40px; padding: 0; margin: 0 5px; border: none; border-radius: 0; position: relative; z-index: 1; transition: all 0.3s ease 0s; } .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: transparent; } .pagination li a.page-link:before{ content: ''; background-color: #f5f5f5; height: 100%; width: 100%; position: absolute; left: 0; top: 0; z-index: -1; transition: all 0.3s ease 0s; clip-path: polygon(0 20%, 50% 20%, 100% 20%, 100% 80%, 50% 80%, 0 80%); } .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{ background-color: #269390; clip-path: polygon(0 20%, 50% 0, 100% 20%, 100% 80%, 50% 100%, 0 80%); } @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; } }