jkkenzie Posted May 9, 2008 Share Posted May 9, 2008 I would to specify the size(leght or width) of the input box with the code below: echo "<select name='country'>"; while($nt=mysql_fetch_array($result2)){ echo "<option value='$nt[country]'"; if($nt[country] == "KENYA") { echo " selected"; } echo ">$nt[country]</option>"; } echo "</select>"; Thanks in advance Joe Link to comment https://forums.phpfreaks.com/topic/104851-specify-width-of-input-box-in-php/ Share on other sites More sharing options...
nafetski Posted May 9, 2008 Share Posted May 9, 2008 Do it with CSS =) Google "Style select box with CSS" and you will find some great articles. Select boxes are one of the more tricky elements to style correctly, but width is really easy. .selectbox{ width:100px; } Then apply class='selectbox' Hope that helps! Link to comment https://forums.phpfreaks.com/topic/104851-specify-width-of-input-box-in-php/#findComment-536823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.