Table cells overflow despite box-sizing: border-box
问题 I want to add padding to the cells of my table, but this causes text, inputs, etc inside the table to overflow. From other Stack Overflow discussions, I've gathered that the answer is to set box-sizing: border-box , but this isn't working for me. Below is a minimal example to illustrate the problem. * { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } table, th, td { border: 1px solid black; padding: 1.5%; } table { border-collapse: collapse; } <table>