• Resolved dakldw

    (@dakldw)


    how do i fix these pagination buttons: https://imgur.com/2BNR0p3
    i want them centered but everytime i add padding to left or right, the buttons move to the right. also how do i space them so i can see ‘previous’ and ‘next’?
    heres my css:

    .dataTables_paginate a {
    	font-family: Montserrat;
    	font-size: 12px;
    	text-decoration: none !important;
    }
    
    .dataTables_paginate {
    	margin: 0 auto !important;
    	width: 50% !important;
    }
    
    .paging_simple .paginate_button.previous:before,
    .paging_simple .paginate_button.next:after {
    	background-image: linear-gradient(to right,#fbcabb,#ceb6d9);
    	border-radius: 15px;
    	padding: 10px 40px 10px 40px;
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter dakldw

    (@dakldw)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks! You could maybe try this “Custom CSS”:

    .dataTables_paginate a {
    	font-family: Montserrat;
    	font-size: 12px;
    	text-decoration: none !important;
    }
    
    .dataTables_paginate {
    	float: none;
    	width: 100%;
    	text-align: center;
    }
    
    .paging_simple .paginate_button.previous,
    .paging_simple .paginate_button.next {
    	background-image: linear-gradient(to right,#fbcabb,#ceb6d9);
    	border-radius: 15px;
    }
    .paging_simple .paginate_button.previous,
    .paging_simple .paginate_button.previous:before,
    .paging_simple .paginate_button.next {
    	padding: 10px 40px;
    }

    That’s the best that I can do here right now.

    Regards,
    Tobias

    Thread Starter dakldw

    (@dakldw)

    thank you! it worked after removing width: 100%; from .dataTables_paginate
    i have some more questions, sorry lol. is there anyway i can move the text ‘previous’ and ‘next’ and place it between the buttons? and then change the same text to something like ‘page 1 of 10’?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I’m not sure what you mean. You can get text like “page 1 of 10” by enabling the “Table Info” checkbox on the table’s “Edit” screen.

    Regarding the positioning, I can only recommend to play around with this more in the developer tools of the browser, I recommend those from Chrome for this.

    Regards,
    Tobias

    Thread Starter dakldw

    (@dakldw)

    this illustration should help visualize it: https://imgur.com/pG6eVhD thats how im trying to make it look but im having trouble with spacing, the buttons just overlap the text. also, the table info checkbox misaligns the centered pagination.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ok, that will be a bit more difficult I think, and I’m not sure if there is an easy solution 🙁 You might have to directly work with the HTML output of the external DataTables JS library. Unfortunately, that’s beyond what I can help with, as I’m not an expert with that library (I only use it with TablePress, but I’m not its developer). Sorry.

    Regards,
    Tobias

    Thread Starter dakldw

    (@dakldw)

    ok 🙁 i was able to remove the text ‘previous’ and ‘next’ by using your extension changing data strings via json and all thats left now is the arrows. but the arrows arent centered properly, it seems like theres something thats pushing the arrows to the left/right: https://imgur.com/Uarra0o also whenever i try to change the size using font-size: 20px; the arrows are pushed to the bottom and vertical-align: middle !important doesnt work: https://imgur.com/45FJRRN

    im not sure how to remove the text from the website but it happens on there too and i provided images from localhost

    also, heres the code

    
    .dataTables_paginate a {
    	font-family: Montserrat;
    	font-size: 12px;
    	text-decoration: none !important;
    }
    
    .dataTables_paginate {
    	float: none;
    	text-align: center;
    	padding: 30px !important;
    }
    
    .paging_simple .paginate_button.previous,
    .paging_simple .paginate_button.next {
    	background-image: linear-gradient(to right,#fbcabb,#ceb6d9);
    	border-radius: 20px;
    	margin: 20px;
    }
    
    .paging_simple .paginate_button.previous:before,
    .paging_simple .paginate_button.next:after {
    	text-shadow: none !important;
    	font-size: 20px;
    	vertical-align: middle !important;
    }
    
    .paging_simple .paginate_button.previous:before {
    	content: '\003C' !important;
    }
    
    .paging_simple .paginate_button.next:after {
    	content: '\003E' !important;
    }
    
    .paging_simple .paginate_button.previous,
    .paging_simple .paginate_button.previous:before,
    .paging_simple .paginate_button.next {
    	padding: 20px 60px;
    }
    
    .paginate_button:before,
    .paginate_button:after {
    	color: #fff;
    }
    
    Thread Starter dakldw

    (@dakldw)

    also is it possible to change the font-family of the arrows to something like font-family: Montserrat? whenever i do the arrows show as squares https://imgur.com/CFdnxWG

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    Sorry for the late reply! As I was on holidays, I did not have a chance to look at this earlier.

    Unfortunately, I don’t really see why this happens, sorry. I can only suggest to play around with the developer tools in the browser here.
    Changing the font is possible, but you’d have to assign a different character via the content CSS property.

    Regards,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Pagination’ is closed to new replies.