jmcclell / django-bootstrap-pagination

Django template tag for rendering Page objects as Bootstrap pagination HTML
MIT License
212 stars 83 forks source link

Pagination showing vertically instead of horizontally #65

Closed Olamyy closed 6 years ago

Olamyy commented 6 years ago

Hi, I'm attempting to use this package but for some reason, I seem to be getting the pagination list horizontally instead of vertically. Is there something I'm missing or should check out to fix this?

Thanks.

vnlinh112 commented 6 years ago

You can write your own css:

ul.pagination li {
    display: inline;
}

ul.pagination li a {
    position: relative;
    float: left;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    color: #5cb85c;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

ul.pagination li span, ul.pagination li a:hover {
    position: relative;
    float: left;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #fff;
    border-color: #5cb85c;
    background-color: #5cb85c;
}

ul.pagination li:first-child a, ul.pagination li:first-child span {
    margin-left: 0;
    border-bottom-left-radius: 0.25rem;
    border-top-left-radius: 0.25rem;
}

ul.pagination li:last-child a, ul.pagination li:last-child span {
    margin-right: 0;
    border-bottom-right-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}
kvdveer commented 6 years ago

Vertical pagination is not part of BS3, so this project has no way to support that. The solution provided by @vnlinh112 should be fine though.