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,
The problem is due to the input element box model. I just recently found a nice solution to the issue when trying to keep my input at 100% for mobile devices.
Wrap your input with another element, a div for example. Then apply the styling you want for your input to that the wrapper div. For example:
.input-wrapper {
border-raius:5px;
padding:10px;
}
.input-wrapper input[type=text] {
width:100%;
font-size:16px;
}
Give .input-wrapper rounded corner padding etc, whatever you want for your input, then give the input width 100%. You have your input padded nicely with a border etc but without the annoying overflow!