开发者

How to center a Paypal button in IE8

开发者 https://www.devze.com 2022-12-23 12:54 出处:网络
On one of my pages, http://artistsatlaketahoe.com/abstract.html, the Paypal buttons appear centered beneath text in FireFox and Chrome, but not in IE8. I go开发者_开发问答t the centering to work in FF

On one of my pages, http://artistsatlaketahoe.com/abstract.html , the Paypal buttons appear centered beneath text in FireFox and Chrome, but not in IE8. I go开发者_开发问答t the centering to work in FF and Chrome by adding the following within the Paypal code snippet relating the Add to Cart image:

style="display: block; margin: 0 auto;"

Unfortunately, it isn't working in IE8. Any suggestions? Thanks!!


give it a width to the button


for IE the button needs to have a width, and the container for the button should have text-align:center; set.

/*Center the paypal button in IE*/
#paypal-button-container{
  text-align:center;
}
/*Center the button in modern browsers*/
#paypal-button{
  display: block; 
  margin: 0 auto;
  width: 100px;
}


add align="left";

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号