I have a div with 1 em of padding.
Inside is a textbox, with the width set to 100%. This looks fine and as expected, with the width set 1 em inside the div.
However, when I add 1 em of padding-left to the textbox, the text box width is widened by 1 em, ignoring the padding on the right. So it now touches the edge of the div.
How do I resolve this?
<div style="padding:1em;background-color:pink">
<input style="width:100%;padding-left:1em" />
</div>