Seems a really basic and silly question - How do I center the footer?

I have the normal ZEN theme. I tried already putting HTML CENTER and CSS align center in different location. So far the footer is left only.

How can that be fixed?

PS: I have some php and css knowledge, so I am a bit puzzled why it can't be set with code.

Comments

bhavin.ahya’s picture

Copy page.tpl file to your sub-theme, in which you can see 'print $footer'
apply css to that div, class to make footer in the center

flameproof’s picture

I placed a "text-align: center;" in all footer elements, that is #footer, #footer-inner, #footer-message

Still, the footer stays left.

Update: ok, I had to move some /div from below the footer area above it. Now it's fine.

bhavin.ahya’s picture

Yes, By moving some /div, I think you got it.

beautifulmind’s picture

In fact, you need to change the width and the floating rules of that particualr div. If the width of the div is smaller then of its parent, even if you add text-align:center, it won't make that display. Also add border rule when debugging the div, it will give you a better idea of placement of the div. You can first edit the rules with firebug and then copy them to your stylesheet.

Regards.

Regards.
🪷 Beautifulmind