how do I centre a link?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
baz0927
Registered User
Posts: 12
Joined: Fri May 30, 2008 7:43 pm

how do I centre a link?

Post by baz0927 » Thu Sep 11, 2008 7:00 pm

I have maaged to add a papal button to my forum in the " overall footer " ,but how do I centre it as its stuck on the left.
My forum is here
http://merseysidebranchrtra.com/forum/i ... 98c90dfe27
the paypal link is at the bottom left

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3223
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: how do I centre a link?

Post by thecoalman » Thu Sep 11, 2008 8:11 pm

Try wrapping it in a div and use margin:auto

Code: Select all

<div style="margin:auto;">

[paypal code]

</div>


baz0927
Registered User
Posts: 12
Joined: Fri May 30, 2008 7:43 pm

Re: how do I centre a link?

Post by baz0927 » Fri Sep 12, 2008 7:28 am

Tried that, cleared cache , nothing changed

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3223
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: how do I centre a link?

Post by thecoalman » Fri Sep 12, 2008 8:27 am

I'd take the button out first and try and fix the exising errors first. You apprenlty have some missing tags and other errors. The paypal button itself is going to throw a lot of errors but the other errors without such as missing <div> tags can play havoc with a layout.

http://validator.w3.org/

When its all said and done this should work:

Code: Select all

<div style="margin:auto; width: 76px;">

 [paypal code]

</div>

baz0927
Registered User
Posts: 12
Joined: Fri May 30, 2008 7:43 pm

Re: how do I centre a link?

Post by baz0927 » Fri Sep 12, 2008 1:27 pm

Yes that worked. thanks for your help.
I have a hidden stats counter installed in the footer aswell, this was causing most of the errors, but it all works and looks great.

Locked

Return to “[3.0.x] Support Forum”