Paypal-checkout-components: Change Smart Button z-index

Created on 17 Jul 2019  路  2Comments  路  Source: paypal/paypal-checkout-components

Hello,

I'm implementing a _PayPal Smart Button_, and it sets its z-index to 100, which breaks all my modals in the webpage. Is there a way to prevent it from setting its z-index?

Thanks!

Most helpful comment

You can wrap it in something with a relative position and z-index 1 to prevent the item from interfering.

Something like:

<div style="position: relative; z-index: 1;">
  <paypal-button-here />
</div>

All 2 comments

You can wrap it in something with a relative position and z-index 1 to prevent the item from interfering.

Something like:

<div style="position: relative; z-index: 1;">
  <paypal-button-here />
</div>

The fix above works, but why is the z-index on these buttons 100 in the first place... ?

Was this page helpful?
0 / 5 - 0 ratings