HTML, align two elements on both sides of the same line

前端 未结 5 877
名媛妹妹
名媛妹妹 2021-01-14 06:03

Without using table, how can I align two elements (one at left, another at right) in the same line?

5条回答
  •  醉话见心
    2021-01-14 06:32

    HTML content :

    left
    right


    Style as shown below

    .container{ width:100%; }
    .align-left{ float: left;width:50%; } .align-right{ float: right;width:50%; }

提交回复
热议问题