Left, center, and right align divs on bottom of same line

前端 未结 6 1847

I have three divs that I would like to display on the same line. Each of the three has different widths and heights, and they are not straight text. I\'d like to left-align one

6条回答
  •  既然无缘
    2021-02-05 09:49

    A further enhancement to the first answer:

    In the "center" div CSS, you need to add:

    text-align:center;
    

    In the "right" div CSS, you need to add:

    text-align:right;
    

    ... to perfectly achieve left/center/right aligning.

提交回复
热议问题