.pagination-outer{ text-align: center; } .pagination{ font-family: 'Raleway', sans-serif; display: inline-flex; position: relative; } .pagination li a.page-link{ color: #80ae31; background: transparent; font-size: 17px; font-weight: 700; text-align: center; line-height: 28px; height: 35px; width: 35px; padding: 0; margin: 0 7px; border: 2px solid #80ae31; border-radius: 0; display: block; position: relative; z-index: 0; transition: all 0.5s ease 0s; } .pagination li:first-child a.page-link, .pagination li:last-child a.page-link{ font-size: 23px; line-height: 28px; } .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; border-color: #80ae31; border-top-color: transparent; } .pagination li a.page-link:before{ content: ''; background-color: #80ae31; height: 0; width: 100%; opacity: 0; position: absolute; left: 0; bottom: 0; z-index: -1; transition: all 0.5s ease-out 0s; } .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{ height: 100%; opacity: 1; } @media only screen and (max-width: 480px){ .pagination{ font-size: 0; display: inline-block; } .pagination li{ display: inline-block; vertical-align: top; margin: 0 0 15px; } }