How do I set the size of an HTML text box?
Your textbox code:
<input type="text" class="textboxclass" />
Your CSS code:
input[type="text"] {
height: 10px;
width: 80px;
}
or
.textboxclass {
height: 10px;
width: 80px;
}
So, first you select your element with attributes (look at first example) or classes(look last example). Later, you assign height and width values to your element.
Elements can be sized with the height and width attributes.
Just use:
textarea {
width: 200px;
}
or
input[type="text"] {
width: 200px;
}
Depending on what you mean by 'textbox'.
You can make the dependent input width versus container width.
.container {
width: 360px;
}
.container input {
width: 100%;
}
input[type="text"]
{
width:200px
}