我想将两个DIV放置在另一个容器中,以便第一个靠父母的左边缘,而第二个靠父母的右边缘。这是我到目前为止的标记:

<div class="parent">
   <p class="flushleft">
        This paragraph should be aligned left.
   </p>
   <p class="flushright">
        This one should be aligned right.
   </p>
</div>


不使用浮点数怎么办?如果可能的话,我希望一切都保持正常。谢谢!

最佳答案

在CSS代码中使用display: inline-block

关于html - 在CSS中水平填充而不使用浮点数/clearfixes?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20830075/

10-09 20:07
查看更多