How to center Paypal button in Wordpress

fromrachel

Member
Joined
Dec 14, 2013
Messages
229
Points
18
I am setting up a Wp single page and generated a Paypal button, I have codes from Paypal and inserted on the page. But the problem is although its centered in Wordpress editor but when viewing on my browser it still shows the buttons on the left hand side. Is there an html code I'm missing or something to make Paypal button center on my WordPress page?
 

AMVXT

New member
Joined
Mar 13, 2017
Messages
8
Points
0
CSS is your friend.
Use the browser's Inspect function to find the element in page source.
Use "margin: auto" on the button element, or "text-align: center" on the div containing the button.
With CSS you can also easily control the padding (space around the element) and many other things.

CSS is easy to learn, very powerful and extremely useful!
Styling in html works too, but it is so 1998 :) Every webmaster should know and be able to use basic CSS! :) The best way to learn it is to start with simple things, like centering.
 

harrygreen90

Member
Joined
Dec 17, 2013
Messages
309
Points
18
I am setting up a Wp single page and generated a Paypal button, I have codes from Paypal and inserted on the page. But the problem is although its centered in Wordpress editor but when viewing on my browser it still shows the buttons on the left hand side. Is there an html code I'm missing or something to make Paypal button center on my WordPress page?
Wordpress editor can remove any HTML tags after you edited your posts. Note on that!

There are a few way to center Paypal button in Wordpress as following.

Adding

<center></center> around your Paypal button.

Creating a div with this code: <div style="text-align:center;">Your Paypal button</div> or <div style="margin: 0px auto;">Your Paypal button</div>

You can replace style="" with a class="" into a CSS file to make your code more professional.


Hope that helped.
 

MattCarson

New member
Joined
Jan 21, 2018
Messages
5
Points
0
Hey there! PayPal gives you the HTML code that you can use your web page so that you can start receiving online payments. By default, this code produces a button which places at left-side on your page. you can center the button yourself with some CSS code. The CSS code can change the PayPal button, centering it on the page without changing its functionality.
/* center Paypal button */
input.wpedon_paypalbuttonimage {
display: block;
margin: 0 auto;
}
 
Newer threads
Replies
6
Views
2,576
Replies
5
Views
15,345
Replies
14
Views
3,436
Replies
6
Views
2,747
Latest threads
Replies
0
Views
1
  • Deleted
  • Deleted by Admin
Replies
0
Views
8
Replies
0
Views
1
Replies
0
Views
2
  • Deleted
  • Deleted by Admin
Replies
0
Views
1
Recommended threads
Replies
12
Views
3,303
Replies
17
Views
4,389
Replies
13
Views
5,761
Replies
3
Views
4,395
Replies
1
Views
635

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Latest Blog ArticlesMost Viewed Threads

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top