跨浏览器CSS左对齐和右对齐在同一行 [英] Cross-browser CSS for left align and right align on the same line

查看:217
本文介绍了跨浏览器CSS左对齐和右对齐在同一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

跨浏览器的CSS,它允许在同一行上的文本的左右对齐?

Cross-browser CSS that works to allow both left and right align of text on the same line?

示例(每个文本引用应该对齐到最左边或右侧):

Example (where each text quote should be aligned as far left or right as possible, respectively):

stuff on the right                                              stuff on the left




  • 没有浮动的答案,除非有一种方法使文本 out of the parent div / container in a multicolumn css page ...

    • No float's answer's please.. unless there is a way to make the text not break out of the parent div/container in a multicolumn css page...
    • 推荐答案

      标签:

      <div>
        <p style="float: left">stuff on the left</p>
        <p style="float: right">Tstuff on the right </p>
      </div>
      

      使用内置标签:

      <div>
        <span style="float: left">stuff on the left</span>
        <span style="float: right">Tstuff on the right</span>
      </div>
      

      这篇关于跨浏览器CSS左对齐和右对齐在同一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆