List Box issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mailanusha
    New Member
    • Jun 2007
    • 6

    #1

    List Box issue

    Hi

    I am using a listBox which has 31 items.

    Code:
     
    
    <SELECT NAME=lst_id size=1>
      <OPTION> 1 </OPTION> 
      <OPTION> 2 </OPTION> 
      <OPTION> 3 </OPTION> 
      <OPTION> 4 </OPTION> 
      <OPTION> 5 </OPTION> 
      <OPTION> 6 </OPTION> 
      <OPTION> 7 </OPTION> 
      <OPTION> 8 </OPTION> 
      <OPTION> 9 </OPTION> 
      <OPTION> 10 </OPTION> 
      <OPTION> 11 </OPTION> 
      <OPTION> 12 </OPTION> 
      <OPTION> 13 </OPTION> 
      <OPTION> 14 </OPTION> 
      <OPTION> 15 </OPTION> 
      <OPTION> 16 </OPTION> 
      <OPTION> 17 </OPTION> 
      <OPTION> 18 </OPTION> 
      <OPTION> 19 </OPTION> 
      <OPTION> 20 </OPTION> 
      <OPTION> 21 </OPTION> 
      <OPTION> 22 </OPTION> 
      <OPTION> 23 </OPTION> 
      <OPTION> 24 </OPTION> 
      <OPTION> 25 </OPTION> 
      <OPTION> 26 </OPTION> 
      <OPTION> 27 </OPTION> 
      <OPTION> 28 </OPTION> 
      <OPTION> 29 </OPTION> 
      <OPTION> 30 </OPTION> 
      <OPTION> 31 </OPTION> 
     </SELECT>
    I get a scroll if the items are more than 30.This is the default scroll.
    If i have less than 30 items i dont get a scroll.

    Is it possible to set the count value for which the scroll must appear. i.e say can i get a scroll after my number of items are more than10.

    But i dont want to use "multiple" tag and my "size" attribute must be fixed as 1.
    =>With these conditions, how can i make it possible.

    Thanks
    mailanusha
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    It's not possible. That's what the size attribute is for.

    Comment

    • nirchuk
      New Member
      • Nov 2007
      • 4

      #3
      Hi

      You need to do like this

      1. <html>
      2. <head>
      3. <style type="text/css">
      4. .select_size
      5. {
      6. font-size: 50;
      7. }
      8. </style>
      9. </head>
      10. <body>
      11.<SELECT NAME="lst_id" CLASS="select_s ize">
      12. <OPTION> 1 </OPTION>
      13. <OPTION> 2 </OPTION>
      14. <OPTION> 3 </OPTION>
      15. <OPTION> 4 </OPTION>
      16. <OPTION> 5 </OPTION>
      17. <OPTION> 6 </OPTION>
      18. <OPTION> 7 </OPTION>
      19. <OPTION> 8 </OPTION>
      20. <OPTION> 9 </OPTION>
      21. <OPTION> 10 </OPTION>
      22. <OPTION> 11 </OPTION>
      23. <OPTION> 12 </OPTION>
      24. <OPTION> 13 </OPTION>
      25. <OPTION> 14 </OPTION>
      26. <OPTION> 15 </OPTION>
      27. <OPTION> 16 </OPTION>
      28. <OPTION> 17 </OPTION>
      29. <OPTION> 18 </OPTION>
      30. <OPTION> 19 </OPTION>
      31. <OPTION> 20 </OPTION>
      32. <OPTION> 21 </OPTION>
      33. <OPTION> 22 </OPTION>
      34. <OPTION> 23 </OPTION>
      35. <OPTION> 24 </OPTION>
      36. <OPTION> 25 </OPTION>
      37. <OPTION> 26 </OPTION>
      38. <OPTION> 27 </OPTION>
      39. <OPTION> 28 </OPTION>
      40. <OPTION> 29 </OPTION>
      41. <OPTION> 30 </OPTION>
      42. <OPTION> 31 </OPTION>
      43. </SELECT>
      44. </body>
      45.</html>

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        That is not what he is trying to accomplish and the markup is invalid.

        Comment

        • Death Slaught
          Top Contributor
          • Aug 2007
          • 1137

          #5
          nirchuck please use proper CODE tags around your code.

          Also there's no need to capitalize your tags like (this goes to the origonal poster aswell).

          Thanks, Death

          Comment

          Working...