我有两个我需要水平居中,但他们需要彼此相邻。基本上,动态添加的HTML是一个按钮。这是我的两个代码,CSS是内联的,无论我尝试什么,我都无法得到这个工作。如果我使用显示:inline-block的,我不能让他们成为彼此:(旁边居中两个div的水平,彼此相邻?
<div class="infor-experience col-lg-2 more_info">
<div class="bottom-add-bid-buttons">
{% if request.user|isEmployer %}
<div class="add-to-list" style="float:left; width:300px;">{% include "layout/addtolistmodal.html" %}</div>
<div class="connect-now bottom" style="width:300px; margin-left:320px;">{% include "layout/bidmodal.html" %}</div>
{% endif %}
</div>
</div>
有了这个代码,这两个按钮是彼此相邻,但它们不是水平居中
。感谢您的帮助!
可你只是发表您的输出屏幕截图? –