lmhart Posted October 23, 2009 Share Posted October 23, 2009 Is it possible to set a drop down list and text boxes to a certain width? here is my code echo "<select name='categories'>"; echo "<option value=$row>Categories</option>"; while($row = mysql_fetch_array($result)) { echo "<option value=\"$row[category]\">$row[category]</option>.' '"; } echo '</select>'; and Reciept Number:<br> <input name="record_receipt" type="text" id="record_receipt"> Link to comment https://forums.phpfreaks.com/topic/178776-drop-down-and-text-box-issue/ Share on other sites More sharing options...
lmhart Posted October 23, 2009 Author Share Posted October 23, 2009 Ok I figured out how to do the text boxes. Link to comment https://forums.phpfreaks.com/topic/178776-drop-down-and-text-box-issue/#findComment-943070 Share on other sites More sharing options...
lmhart Posted October 26, 2009 Author Share Posted October 26, 2009 but I still can not figure out how to adjust the size of the drop downs Link to comment https://forums.phpfreaks.com/topic/178776-drop-down-and-text-box-issue/#findComment-944721 Share on other sites More sharing options...
Bricktop Posted October 26, 2009 Share Posted October 26, 2009 Hi lmhart, You could just do something like; echo "<select name='categories' style='width:100px'>"; Or, using CSS you could do: <style type="text/css"> .selectwidth { width:100px; } </style> echo "<select name='categories' class='selectwidth'>"; Hope this helps. Link to comment https://forums.phpfreaks.com/topic/178776-drop-down-and-text-box-issue/#findComment-944724 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.