CSS: How to align vertically a “label” and “input” inside a “div”?

后端 未结 7 1341
刺人心
刺人心 2020-11-29 17:59

Consider the following code:

HTML:

相关标签:
7条回答
  • 2020-11-29 18:39

    You can use display: table-cell property as in the following code:

    div {
         height: 100%;
         display: table-cell; 
         vertical-align: middle;
        }
    
    0 讨论(0)
提交回复
热议问题