Hey guys, I was wondering if any of you know how to correctly center a PayPal button on Wordpress. It seems like such a basic thing to do, but I have had zero success with the methods that I know.
The paypal button contains a dropdown menu so that means the button is in a < table > format. This eliminates some methods of centering.
I have attempted the following inline CSS with no success.
< div style=“margin:0px auto; width:400px;” > < /div >
I have tested the centered paypal button on JSFiddle and its centering without any problems. It just seems when I enter the code into Wordpress it does not work.
The thing about wp is they have a strange issue when you try to input things using the html editor. They sometimes strip things away.
I would then use a shortcode plugin if nothing else works.
If you want to eliminate the theme being the reason, i would then switch it to the default theme or just create a staging site just for all the other test without messing a live site.
PROBLEM SOLVED![quote=“dddd, post:4, topic:2667”]
The thing about wp is they have a strange issue when you try to input things using the html editor. They sometimes strip things away.
[/quote]
Thanks to what you said, it got me thinking. Since WP does not like certain things entered into the HTML editor, I thought, well why not see if I can center it using settings that WP offers. I tried going into the view mode, and selecting the entire PayPal table and tried to center it. I had no success. I then selected each part of the PayPal button and hit the center text button and surprisingly is centered everything correctly!
The weird part is when I enter the HTML code into Jsfiddle it does not appear centered, but it does on WordPress which is all I care about right now. I have literally spent the entire day trying to figure it out!
There are so many variables and compatibility issues its ridiculous! But the moment when you finally fix something which aint working right is the best feeling in the world.