Saturday, January 18, 2014

[Solved] Paypal Button Not Displaying Correctly in Joomla

I have experienced a high level of frustration when adding Paypal "Subscribe" buttons to my Joomla website.  The Paypal hosted  image never displays correctly. I finally came across the answer after a little bit of research.

Have you added the code to your article or module and then find that the 147px x 47px image looks like this? Much smaller than you would like.

Have you tried to alter the code and find that even if you change the width and height the image will adjust the width but not the height?

This is more than likely happening because of your CSS settings.  Because the code for your Paypal button is <form> code the default settings in your template's stylesheet will control how the button image is displayed.

The Simple Solution:

Apply your own custom style in the HTML code for the Paypal button.

  1. Go to your button code in your Joomla article or module

  2. Add this code after the alt text "The safer, easier way to pay online!":  style="border: 0px none ; padding: 0px; width: 147px; height: 47px;"

  3. In that string of code you will need to delete the the HTML code border="0"

Of course you can adjust the width and height as needed.  These values are the default size of the basic Subscribe button from Paypal.  Your button should now look correct in your Joomla article or module.



**Note: Your code may also contain a link for a pixel.gif with a width="1" height="1". This is NOT the image that displays your button so there is no need to edit this image.**

Please be aware that this is what has worked for me.  Please backup your website before making any adjustments to the code. Use this advice at your own risk.

No comments:

Post a Comment