How to Resize PayPal Buttons
Your website's design determines how large its PayPal buttons should be. For example, if a page describes payments as quick and secure, you may want a large, visible PayPal button. If each page's footer contains a donation link, you may prefer a small, unobtrusive button. You can edit a button's size by editing its HTML code, which PayPal generates. The code lists several payment parameters and may look intimidating, but only one element in it, the image, defines the button's size.
-
1.
Access the source file of the page that contains the button. If you have saved a copy of the site locally, open the source file from the site folder on your computer. If you edit the site using a direct FTP connection, access the file with your FTP client.
-
2.
Scroll to the button's code, which may look something like the following;
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="vpfinance@menezes.org"> <input type="hidden" name="item_name" value="Menezes General Expenditures"> <input type="hidden" name="page_style" value="PayPal"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-DonationsBF"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_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>
-
3.
Identify the element within the code that contains the button's image as a GIF file. In the above example, the element uses the following code:
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-
4.
Insert "width" and "height" properties within the element. For example, to set a width of 92 pixels and a height of 26 pixels, change the code to:
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" width="92" height="26">
-
5.
Save your file and preview it in a browser. Edit the height and width as necessary.
-
6.
Save the file locally. Publish the updated page to your site using your FTP client.
References
Resources
Writer Bio
Ryan Menezes is a professional writer and blogger. He has a Bachelor of Science in journalism from Boston University and has written for the American Civil Liberties Union, the marketing firm InSegment and the project management service Assembla. He is also a member of Mensa and the American Parliamentary Debate Association.