Log in

View Full Version : Resolved How to centre a PayPal button



dougsmith
05-02-2009, 03:19 PM
Here is the code for an image with text along side and the PayPal button. Everything is the way I want it except the paypal button should be centered under the $24.99. I have searched the forum high and low and can't find the answer. Thanks for all of your help!


<div>
<div style="float:left; width:300;">
<p style="color:8B008B; font-family:sienna; font-size:20pt; width:700; text-align:center;">
<img src="http://idisk.mac.com/dougmac3684-Public/jtlcover4site.jpg" align="left" >
<br>
<br>
<br>
<br>
<br>
Journey To Love Audio CD
<br>
$24.99

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="5147941">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


</p>
</div>

Snookerman
05-02-2009, 03:27 PM
Give the input the following CSS rules:

display: block;
margin: 0 auto;

Good luck!

dougsmith
05-02-2009, 05:50 PM
Snookerman:
Thanks so much for the fast reply. Is there a way to do this inline? It's a convoluded situation, the website is going to be redone and this is a "patch" until the entire web is redone. Just want to be able to list 3 or 4 Audio CD's down the page with the paypal button til that happens. I was going to copy the code 3 times and change the images and prices once I get the formatting correct. Thanks in advance for your time and energy.

Snookerman
05-02-2009, 06:04 PM
Sure:

<input style="display: block; margin: 0 auto;" type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">


Good luck!

dougsmith
05-02-2009, 06:45 PM
Snookerman-
Thank you so much. It's people like you who make the world go round....
Doug

Snookerman
05-02-2009, 09:06 PM
You're welcome Doug, I'm glad to help you out (or around :D)

Good luck with your site!

nanduhc
08-17-2009, 05:17 PM
Thanks Guys, It worked for me too. I placed it inside my Drupal Code.

Snookerman
08-17-2009, 08:44 PM
Sure thing nanduhc, glad to help you out!