【问题标题】:How to fit two divs side by side horizontally?如何水平并排放置两个div?
【发布时间】:2012-02-16 06:04:03
【问题描述】:

如何使用css将两个div水平并排放置,其中容器DIV的方向是从右到左?

【问题讨论】:

    标签: css layout html


    【解决方案1】:
    <div style="float:right;">
        Right div
    </div>
    <div>
        Left div
    </div>
    

    【讨论】:

    • 正确的 div 必须先走吗?直观地说,我会先列出左 div,然后再列出右 div。
    【解决方案2】:
    <div style="width:960px;overflow:hidden;">
      <div style="float:right;width:600px;overflow:hidden;">
         //right DIV
      </div>
      <div style="float:right;width:360px;overflow:hidden;">
         //left DIV
      </div>
    </div>
    

    【讨论】:

    • 考虑为您的示例添加解释性文本。
    猜你喜欢
    • 1970-01-01
    • 2010-09-24
    • 2011-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多