我有一個包含2個文本部分的頁腳div。 我希望第一個在左側,第二個在中間 - 它的位置不會受到屏幕頁面的干擾。 (圖片:移動紅色部分的粉紅色的)如何將文本居中放在左側有一些文本的同一行
我做了一個的jsfiddle例如所以它可能幫助你在這個帖子的末尾 -
HTML:
<div class="footer">
<span style="float:left;">Copyright © 2014 blaclaclaclacl All rights reserved.</span>
<span style="margin: 0 auto;">
<a href="javascript:void(0)" onclick="$('#extpopup').show('slow');return false;" class="copy">Terms & Conditions</a>
</span>
<div style="clear:both"></div>
</div>
CSS:
.footer{
border:1px solid black;
}
http://jsfiddle.net/dfn2wepv/2/ ???? – 2014-09-04 11:20:30
只需在另一個跨度上添加「style =」float:right;「」。 – brianlasta 2014-09-04 11:36:55