Page 1 of 1
i3theme - Pagination question
Posted: Tue Dec 02, 2008 7:08 pm
by sonichouse
I have tried to squeeze pagination links in to my footer.
I failed to get the navigation centred, but managed to pad it so that it looks OK when on another page other than the first.
Could I ask how I can centre the div ?
I have tried variations with margin-left:auto and margin-right:auto, but this pushes the div below the grey placeholder.
Thanks in advance .... Steve
Re: i3theme - Pagination question
Posted: Tue Dec 02, 2008 10:03 pm
by yellowled
sonichouse wrote:Could I ask how I can centre the div ?
Not a picnic. This is tricky.
sonichouse wrote:I have tried variations with margin-left:auto and margin-right:auto, but this pushes the div below the grey placeholder.
But this is definitely the way to go. Try giving all the elements within .page-nav a width, i.e. 25% for each span and 50% for the pagination. The spans will probably also need display: block;. Then
don't float the pagination div, apply margin: 0 auto; to it and set the padding back to 0.
YL
Posted: Tue Dec 02, 2008 11:33 pm
by Don Chambers
You can definitely center it... but the problem will be that it will be centered in the space remaining between the previous and next links..... obviously, in English, "Previous Page" is longer than "Next Page".... so either you live with your current method, or you could try NOT floating the center pagination div, and applying text-align: center to the entire wrapping div.
Posted: Wed Dec 03, 2008 4:27 pm
by sonichouse
Done it

.
I got around the length of the descriptions problem by padding the divs to 90px so they occupied the same amount of real estate. The Pagination div had text-align:center applied and then in the template when there is not a prev or next entry insert a filler div that is 90px.
Thanks for all your input, much appreciated.
/Steve
Posted: Wed Dec 03, 2008 5:42 pm
by Don Chambers
Looks great Steve!
Posted: Wed Dec 03, 2008 5:46 pm
by sonichouse
Don Chambers wrote:Looks great Steve!
Thanks, my only issue is that when I click page 6 of six I get the [...] instead of all 6 boxes.
I am trying to debug this at the moment.