input type=”text”の横幅を広げる

input type=”text”の横幅を広げる

input type=”text”の横幅を広げるには、cssでwidthを指定します。

strutsの<html:text>タグではsizeで広げることができますが、input type=”text”はcssで指定します。

<input type="text" class="width200" /><br>
<input type="text" class="width300" /><br>

cssの中身は以下です。

.width200{
width:200px;
}
.width300{
width:300px;
}

DEMO

コメント

タイトルとURLをコピーしました