Backgrid allows editing values in a table, and accomplishes this by putting an <input type="text">
inside the <td>
. The input is set to max-width: 100%
but it still pushes the size of the column out farther in some cases.
For an example, see the grid on their Examples section and click an item in the "Population" column. When it gets the editor
class, its padding is set to 0, and both the <td>
and <input>
have box-sizing: border-box
, but the width of the column still increases.
So does width: 100%
not mean 100% of the width of the <td>
as it is at the time? Or is it just not possible to make this work using CSS only? I could probably use a backbone event to get the size of the td and then set the input to the same size but that sounds a bit hacky.