Jump to content

Drop Down and text box issue


lmhart

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.