i3theme - Pagination question

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

i3theme - Pagination question

Post by sonichouse »

I have tried to squeeze pagination links in to my footer.

Image

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
Steve is occasionally blogging here
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: i3theme - Pagination question

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Post by sonichouse »

Done it :D.
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
Steve is occasionally blogging here
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Looks great Steve!
=Don=
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Post 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.
Steve is occasionally blogging here
Post Reply