How can I get a text box that inherits the width of the container?
For example, I have a div that has a text box inside.
<div id='content' style='width:100%;'> <input type='text' name='txtUsername'> </div>
What I wanted to do was when I resize my browser, the text box should follow the width of its parent div.
Using the code above, the text box always overflows the container when I resize the browser to a smaller width.
html css
rhy
source share