HTML/CSS: how to put text both right and left aligned in a paragraph

后端 未结 6 1680
情歌与酒
情歌与酒 2020-12-28 18:54

What would be the best code to have two bits of text in a single paragraph, one left aligned, the other right aligned, that also is:

  • the least code as possible
6条回答
  •  悲&欢浪女
    2020-12-28 19:41

    I have used this in the past:

    html

    January2014
    

    Css

    .right {
        margin-left:100%;
    }
    

    Demonstration

提交回复
热议问题