【发布时间】:2019-01-24 01:48:23
【问题描述】:
我有一个 div 按钮,它是通过 PayPal 集成创建的,并且我有一些跨度文本,我都想在我的结帐按钮下对齐。问题是我似乎无法将按钮上的文本对齐,同时将它们保持在同一个 div 中。附上图片以供参考。在不拆分它们的情况下实现这种居中的最佳方法是什么?
编辑:
这是目前的代码:
<div class="buttons">
<div class="pull-left"><a href="{{shop.url}}" class="btn btn-default">{{'cart.general.continue_shopping' | t}}</a></div>
{%- if additional_checkout_buttons -%}
<div class="pull-right" id="additional-checkout-buttons" style="margin-left: 40px; margin-top: 8.4px;">
<span id="additional-checkout-buttons-label" style="margin-right: 5px; margin-top: 10.5px; display: inline-block;">{{'cart.general.checkout_using' | t}}:</span>
{{content_for_additional_checkout_buttons}}
</div>
{%- endif -%}
<div class="pull-right"><input type="submit" name="checkout" id="update-cart" class="btn btn-primary" value="{{'cart.general.checkout' | t}}" /></div>
</div>
【问题讨论】:
-
您好,请您添加您的代码。谢谢
-
添加您的代码会很有帮助。
-
请添加一些代码,我们可以帮助您!
-
.pull-right{float:none!important; text-align:center;} 试试这个。否则在此处添加您的代码
标签: html css html-table center centering