我有兩個我需要水平居中,但他們需要彼此相鄰。基本上,動態添加的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>
有了這個代碼,這兩個按鈕是彼此相鄰,但它們不是水平居中
。感謝您的幫助!
可你只是發表您的輸出屏幕截圖? –