Forums

This topic is locked

drop down menu widths

Posted 07 Jan 2005 16:11:10
1
has voted
07 Jan 2005 16:11:10 Chris Trace posted:
This may be a no brainer but how do i -

I have several drop down menus dynamically linked to sql dbase - the data in
these fields varies little but when published i get a lot of uneven drop
down boxes

- is there a way to format all of the drop down menus to be exactly the same
width?

Thanks

Replies

Replied 07 Jan 2005 17:19:55
07 Jan 2005 17:19:55 Chris Trace replied:
the type of menu i am talking about is the same as the select forums one just below this note
Replied 07 Jan 2005 17:48:44
07 Jan 2005 17:48:44 Simon Martin replied:
You can do it with styles and set the style for the drop downs to a given width.
Or you could have a 'dummy' value <!----- PLEASE SELECT AN OPTION --------!> that comes top but has no value and validate against that being submitted with the yaromat check form extension.
Or you could use the CHAR datatype as that will pad the options with white space

But by far the best solution would be to style your drop downs with CSS; either all input fields would share the same width value or you could create classes, say small, medium and long versions

Live the life you love
Love the life you live

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 07 Jan 2005 18:00:40
07 Jan 2005 18:00:40 Chris Trace replied:
Simon,

Thanks - no brainer moment - set the default top item on list as set char set - as for CSS - there are too many variables within the application to account for set drop down widths - at least at this stage - out of interest however where would be a good place to look for information regarding setting the CSS params in this instance.

cheers
Replied 07 Jan 2005 18:07:47
07 Jan 2005 18:07:47 Simon Martin replied:
Check out this article by Trenton Moss on using CSS and forms
www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6797
He shows how to nicely style <input> tags - but the principle is the same for combo boxes

Live the life you love
Love the life you live

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]

Reply to this topic