simon551 Posted May 8, 2007 Share Posted May 8, 2007 Hi, I've tried to set the width of a dynamic select box. I set the width to 150 but it is showing up on the page as about 700. Any idea how to fix this? <tr valign="baseline"> <td nowrap align="left">Project:</td> <td colspan="4" width="150"><select name="ProjID"> <option value="null" <?php if (!(strcmp("null", ((isset($_COOKIE["projID_default"]))?$_COOKIE["projID_default"]:"")))) {echo "selected=\"selected\"";} ?>>--please select--</option> <?php ... and it goes on... Link to comment https://forums.phpfreaks.com/topic/50530-solved-width-settings-in-a-dynamic-select/ Share on other sites More sharing options...
Karl33to Posted May 8, 2007 Share Posted May 8, 2007 it looks like you are setting the width of the td to 150, but the select is much wider and it's stretching the td. you need to use some css on the select to force its width, such as <select name="ProjID" style="width: 150px;"> Link to comment https://forums.phpfreaks.com/topic/50530-solved-width-settings-in-a-dynamic-select/#findComment-248346 Share on other sites More sharing options...
simon551 Posted May 8, 2007 Author Share Posted May 8, 2007 Thank you very kindly! Link to comment https://forums.phpfreaks.com/topic/50530-solved-width-settings-in-a-dynamic-select/#findComment-248568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.