Reputation: 1003
I have just a couple of months of Rails experience and I'm using will_paginate for the first time.
I'm using it in a table foot and I felt really strange that it took a huge height. I inspected it and noticed that it insert elements of 20px margin. Is this the expected behavior? Am I doing something wrong?
If I am not doing it wrong, could you advice on how could I stylish it? I'm using Twitter Bootstrap 3 with the bootstrap-will_paginate gem (tried will_paginate-bootstrap as well). I have reduced this huge margin but it seems awkward to me yet. Maybe centering it would help. I have tried to center without success. Any tips on that?
Upvotes: 0
Views: 492
Reputation: 2629
Pretty late response but since I had the same question...
I used Firebug to figure out which CSS class was used to style pagination and it was pagination
(go figure). Then I just needed to override the CSS in my custom file to tighten up the margin:
/* override will-paginate margins */
.pagination {
margin-top: 10px;
margin-bottom: 10px;
}
I feel the approach is a bit brittle because I am depending on how the gem developers manage CSS but I can't think of a better approach.
Upvotes: 2