CSS - Exact same height and alignment of button and input text box

后端 未结 12 1419
花落未央
花落未央 2020-12-04 15:40

I need to have a button and a tex box sitting next to each other and they have to align up perfectly as if one is bigger than the other then it will be instantly noticeable.

12条回答
  •  -上瘾入骨i
    2020-12-04 16:09

    I am trying to solve this for days and every solution is not whole, and not working in different browsers.

    I find that this code do the work:

    float: left;
    -webkit-box-sizing:border-box;
    -moz-box-sizing:border-box;
    box-sizing:border-box;
    height: 33px;
    

    I have updated Fiddle - https://jsfiddle.net/p9maozk2/

提交回复
热议问题