Well that is what even I thought that I knew HTML. Here is the situation that I have attached.. I want the height of the listbox to the red mark so that I get a smaller listbox. I could manage the width of the textbox using css. But unable to control the vertical. thanks for looking in.. ..:: peace ::.. Jeba
Have you tried something like this: <SELECT height=20 in the html? For example, this will display the first 20 and you scroll down to see the rest: <SELECT height=20 name="options"> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> <OPTION>1</OPTION> </SELECT> Code (markup):
try using a height in both css and html, if neither works then redo the entire the page html, you have an error. CSS - .ClassName select { height: 20px; } (not sure if it will work though, work in earlier html versions) HTML - <select height=20 or <select style="height:20px;" It should work there.
The only real easy way to do it is to use css. Instead of just entering in a number make sure to use PX because that will ensure the size and give you better control of the size.
The <select height=20 is not pixels, it means 20 rows, 20 results, 20 options etc - so do not put pixels on that.
as i see Astroman's solution is good but if you want exact height then control select field font style by css. because height of that 20 rows depends on font size
hi guys.. thanks for your reply.. i tried all that you guys suggested but somehow it doesn't seem to work.. hmm.. ..:: peace ::.. Jeba