I have a situation in my html page where I need an input component and a div component to be the same width. The input has a size attribute of 30, but using the style attribute with "width: 30ch" or "width: 30em" for the div doesn't seem to work as expected. The div ends up wider than the input instead of matching its size.
What attribute should I use to align the width of the div with the size attribute of the input?
Here is the code snippet:
<input type="text" readonly="yes" value="a" size="30" ID="b">
<div id="c" style="width: 30ch"></div>