Forum Moderators: open
Is it possible to set a height to the select tag to avoid it scrolling? We have a select tag with several options within it, when viewing this on one machine with 1024x768 resolution and WinXP OS it displays fine no scroll and IE6, but, on the tester’s machine again running same settings and OS as above it has a scroll bar. Both machines make the available selection go upwards on the screen, therefore plenty real estate to avoid the need for the scroll. What we would like to do if it is possible is set a height within the select to avoid this happening, is this possible?
Obviously setting the size is not acceptable as this displays what ever size specified, and uses more real estate on the screen.
Has anyone ever seen this behavior before?
This requirement only needs to work in IE!
-George
If so why not use size= and programatically work out the value to assign to size based on the number option <option>s being written?
The other alternative would be to use so JS to workout the number of options in the select and assign the size (or CSS height) based on that. This method would be less streamlined than the server side option.
Obviously you need to use a multiple select to acheive this...
HTH
>>Can you access the number of options being rendered (ie: is this being done by some server side code?).
Yes we can access the number of options being rendered through server-side script.
>>If so why not use size=
>>Obviously you need to use a multiple select to acheive this...
Multiple select is not really an option:
a) only one event should happen on the select, either edit, copy or make an audit on the current page along with others.
b) this would use more real estate on the page which is not available.
Thanks for the reply, I can now safely say that there is no way on making the current select larger without making some of the changes you have suggested.
Thanks,
-George
>>If there are only 2 or 3 options which are calls to action, maybe using a button may be a more usable solution?
Afraid there is several on some instances of the application I only listed two or three to give an idea of the intention behind its function.
Again thanks BlobFisk, you are helping me confirm my findings and suggesting some I never thought of, your help is really appreciated :)
-George