Skip Navigation

[Resolved] need pagination with previous | pages | next horizontal on the same line

This thread is resolved. Here is a description of the problem and solution.

Problem: My pagination links break into multiple lines. I would like them to remain in a single line.

Solution: Ensure your ul element is set to display:inline;

Relevant Documentation: https://www.w3schools.com/cssref/

This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by valerieF-2 7 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#503529
PaginationCapture.JPG

I am trying to: display all the pagination items on the same line

here is my toolset custom pagination

<div class="pages">[wpv-pager-prev-page][wpml-string context="wpv-views"]<< Page précédente[/wpml-string][/wpv-pager-prev-page]  [wpv-pager-nav-links reach="3"][wpv-pager-next-page][wpml-string context="wpv-views"]Page suivante >>[/wpml-string][/wpv-pager-next-page]</div>
</codes>
and my css :

.pages {
padding-top:2em;
text-align:center;
}
.pages ul {
padding:0;
margin:0;
list-style-type:none;
}
.pages li {
display:inline;
padding:0.5em;
}
.pages ul li a {
text-decoration:none;
text-align:center;
padding:5px;
border:2px solid;
}
</codes>

Instead, I got: 3 lines.

Could you help me to see what is wrong ?

#503711

Hello, I see your image and it looks like perhaps your ul element is display:block (ul is a block element by default) instead of display:inline or display:inline-block? Or perhaps your container element isn't wide enough to accommodate all the elements in one row? I cannot tell for sure. Debugging custom code and styles is outside the scope of the support we provide here in the forum, so unfortunately I won't be able to provide much advice here. I recommend researching HTML and CSS to understand how to inspect each element and determine which styles are applied, and where they come from. Chrome DevTools documentation is also quite helpful:
hidden link

#503789

Thank you for your help, Christian.
The ul element is now with display:inline and it works ! (so simple !)

Have a nice day !

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.