Bootstrap 3: ¿Cómo mantener la paginación en una línea?

I have the pagination of Bootstrap 3 working fine. Except one thing: The pagination does not remain on one line but go on a new line. For example on the phone view i have three lines of numbers of the pagination. The question is: how can i force to keep the pagination on one line? Thanks!

preguntado el 25 de septiembre de 13 a las 19:09

1 Respuestas

Establecer el ancho de la <ul> to a big value seems to work:

<div class="container">
    <div class="row">
        <div class="col-xs-12">
            <ul class="pagination" style="width:100000px;">

Maybe calculate the real width with javascript / jquery.

Also consider to not display all values but something like : < 1 2 3 ... 1007 >

Respondido el 25 de Septiembre de 13 a las 22:09

The first solution is not working properly, because it keep the site quite long on the right. I am interested in the last solution, how can i do that? Thanks - francescomussi

How do you construct your pagination? Do you use a CMS? in What language, etc. - Bajo Jobsen

I am using Laravel 4. That i can integrate well with Bootstrap. This is the original line of code: {{ $newsletterUsers->links() }} That create a <ul class="pagination"> - francescomussi

Sorry, i don't know anything about Laravel 4. It seems you will have to look at github.com/laravel/framework/blob/master/src/Illuminate/…. Ver también esto stackoverflow.com/questions/18766753/…. Maybe set 13 to a lower value if ($this->lastPage < 13) (line 49 in BootstrapPresenter.php) will do the trick. - Bajo Jobsen

Ok, that set the minimum amount of elements to create a pagination. I try to change some values but not find the right solution. With plain html, how you can modify the pagination in order to <1 2 3 ... 25>? - francescomussi

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.