HTML input textbox with a width of 100% overflows table cells

前端 未结 14 1817
别那么骄傲
别那么骄傲 2021-01-29 20:28

Does anyone know why the input elements with a width of 100% go over the table\'s cells border.

In the simple example below input box go over the table\'s cells border,

14条回答
  •  南笙
    南笙 (楼主)
    2021-01-29 21:03

    I solved the problem by applying box-sizing:border-box; to the table cells themselves, besides doing the same with the input and the wrapper.

提交回复
热议问题