在wordpress中更改按钮位置

change Button Position in wordpress

将“激活交易”按钮的位置更改为“显示优惠券”按钮。

我将此代码用于“显示优惠券”按钮的位置。

div.folding-button {
  position: relative;
  left: 610px;
  Bottom: 150px;
}

我尝试使用以下代码更改“激活交易”按钮的位置:

a.deal-button.activate-button.activate-modal {
  position: relative;
  left: 610px;
  Bottom: 150px;
}

但是“显示优惠券”按钮变形了,“激活交易”按钮不可点击

谢谢。感谢帮助

我已经查看了您的代码,您的问题是您只有一个 HTML class 用于按钮和 1 个主要 class,其中有一张优惠券。如果你用 2 个不同的 class 对 2 个按钮进行排序,并将它们放入正确内容的 div 中,你会找到比 css.

更好的解决方案

无论如何,我已经对您的网站进行了一些 css 研究,并找到了 css 的解决方案。试试下面的代码,让它响应每个屏幕,让它工作得很好。我已经用 1920px 宽度的屏幕测试过它,效果很好。

a.deal-button.show-coupon-button.activate-button.activate-modal{
    position: relative;
    left: 38rem;
    top: -10rem;
}
a.deal-button.activate-button.activate-modal {
    display: block;
    position: relative;
    left: 38rem;
    top: -10rem;
    z-index: 2;
}
.code-button-bg {
    position: relative;
    left: 38rem;
    top: -12.5rem;
    background: #a41913;
}

为了防止标题显示在按钮后面,请将其放入您的 css

h2.title.front-view-title {
    width: 75%!important;
}