• Resolved ibogo

    (@ibogo)


    There are a lot of people who want to know how to centre a Paypal form and the solution is to remove all <table>, </table>, <tr>, <tdbody> or any other code that starts with t.

    Then before EACH LINE, put this:

    <p style=”text-align: center;”>

    and at the END of each line, put this:

    </p>

    My code works perfectly and is centered on page. Hopefully yours will too.

    Here is my code with sensitive info removed (button ID is all x’s):

    <form action=”https://www.paypal.com/cgi-bin/webscr&#8221; method=”post” target=”_top”>
    <p style=”text-align: center;”><input type=”hidden” name=”cmd” value=”_s-xclick”></p>
    <p style=”text-align: center;”><input type=”hidden” name=”hosted_button_id” value=”XXXXXXXXXXXXX”></p>
    <p style=”text-align: center;”><input type=”hidden” name=”on0″ value=”* Email (required)”>* Email (required)</p>
    <p style=”text-align: center;”><input type=”text” style=”width: 225px” name=”os0″ maxlength=”100″></p>
    <p style=”text-align: center;”><input type=”image” src=”https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_LG.gif&#8221; border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”></p>
    <p style=”text-align: center;”><img alt=”” border=”0″ src=”https://www.paypalobjects.com/en_US/i/scr/pixel.gif&#8221; width=”1″ height=”1″></p>
    </form>

    All you need to do is replace XXXXXXXXXXXXX with your button ID (in your code) and you can remove email lines so you just have button, or whatever you want.

    Hope this helps someone!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to centre Paypal form’ is closed to new replies.