swiftmed Posted May 19, 2006 Share Posted May 19, 2006 Hello,I have been asked by one of my clients to make the width of a dynamic dropdown list a certain width. I thought there would be an option like on a text field where you could enter the amount of character width you would like but there is not.Is there a way i can make this a certain width? many thanks for any advice provided. Thank You!! Quote Link to comment https://forums.phpfreaks.com/topic/9995-menulist-width-problems/ Share on other sites More sharing options...
hitman6003 Posted May 19, 2006 Share Posted May 19, 2006 Do you mean a select box? or do you mean a html div or td? If it's the latter, then you can use css to set the width. If you are using a select box, then the width is determined by the length of the text inside of it. Quote Link to comment https://forums.phpfreaks.com/topic/9995-menulist-width-problems/#findComment-37139 Share on other sites More sharing options...
freakus_maximus Posted May 19, 2006 Share Posted May 19, 2006 [!--quoteo(post=375205:date=May 19 2006, 08:50 AM:name=hitman6003)--][div class=\'quotetop\']QUOTE(hitman6003 @ May 19 2006, 08:50 AM) [snapback]375205[/snapback][/div][div class=\'quotemain\'][!--quotec--]Do you mean a select box? or do you mean a html div or td? If it's the latter, then you can use css to set the width. If you are using a select box, then the width is determined by the length of the text inside of it.[/quote]Unless its depricated and I should not be doing it this way, I can set the width of my select box no problem:[code]<select id="myid" NAME="my name" style="WIDTH: 165px">[/code]I use this to keep layout clean and not constantly showing various size boxes. In the example above, I use this for a "Yes" and "No" select box, but obviously the width of the box is going to be more than the text in the box. Quote Link to comment https://forums.phpfreaks.com/topic/9995-menulist-width-problems/#findComment-37147 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.