Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Place the pagination in the middle

I want to center the pagination but no matter what I do it doesn’t work
enter image description here
be like below
enter image description here

My css code :

`
.woocommerce-pagination {
    border-top: 1px solid #eeeeee;
    padding: 0 5px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.woocommerce-pagination ul {
    border: 0 !important;
    margin: 0 !important;
    padding: 0;
    border-radius: 3px;
}
.woocommerce-pagination ul li {
    border: 1px solid #eeeeee !important;
    float: right;
    margin: 5px 0 0 3px !important;
}
.woocommerce-pagination ul li .page-numbers {
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 32px !important;
    color: #000000;
    padding: 0 14px !important;
    display: block;
}
.woocommerce-pagination ul li .page-numbers:hover, .woocommerce-pagination ul li span.current {
    color: #800080 !important;
    background: #f3f3f3 !important;
}
.woocommerce-pagination ul li .page-numbers:focus {
    color: #000000 !important;
    background: #ffffff !important;
}
`

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try this CSS rules instead (in short remove float: right from li element and add flexbox rules to ul element):

.woocommerce-pagination {
    border-top: 1px solid #eeeeee;
    padding: 0 5px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.woocommerce-pagination ul {
    border: 0 !important;
    margin: 0 !important;
    padding: 0;
    border-radius: 3px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.woocommerce-pagination ul li {
    border: 1px solid #eeeeee !important;
    margin: 5px 0 0 3px !important;
}
.woocommerce-pagination ul li .page-numbers {
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 32px !important;
    color: #000000;
    padding: 0 14px !important;
    display: block;
}
.woocommerce-pagination ul li .page-numbers:hover, .woocommerce-pagination ul li span.current {
    color: #800080 !important;
    background: #f3f3f3 !important;
}
.woocommerce-pagination ul li .page-numbers:focus {
    color: #000000 !important;
    background: #ffffff !important;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading