I am having a problem trying to find out how to display the page numbers on a forum in a pleasant way. Please look at the picture below:
As the picture shows, the page numbers appear to the right of the
New Thread button. There will be a very variable number of page number items for every page displayed (ranging from about 12 to more than 20) and as you can see from the picture, a very low amount (14 in this case) already overflows a line and appears in a not so pleasant way.
I'm looking for a way to display these in a flexible, accessible and visually pleasant way without having to renounce to any of the items displayed.
In the development of this interface I am constrained by the fact that I may only edit the CSS of the original (desktop) interface to adapt it to a mobile environment. I may not add or remove any of the already present elements or alter their flow.
How can I improve this?