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

前端 未结 14 1549
别那么骄傲
别那么骄傲 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:05

    I fixed this issue starting with @hallodom's answer. All my inputs were contained within li's, so all I had to do was set the li overflow:hidden for it to remove that excess input overflow.

    .ie7 form li {
      width:100%;
      overflow:hidden;
    }
    
    .ie7 input {
      width:100%;
    }
    

提交回复
热议问题