开发者

Vertical scroll bar for select box on FIREFOX

I am developping an intranet to work on local. I 开发者_运维技巧have got problem with Vertical scroll bar on Firefox. I do not get Vertical scroll bar. If values in select box are too many then some of them goes out of display. I do not understand why i am not getting Vertical scroll bar.

1 http://www.thewebdesign.org/1aa.PNG

this is the code i am using

<style type="text/css">
<!--

.myselectbox {

    font-family: Tahoma;
    font-size: 18px;
    background-color: #F5F5F5;


}
    option {
    font-family: Tahoma;
    font-size: 18px;
        background-color: #fef5e6;
        padding:8px;
        margin:5px;

        border-top: 1px solid #ebdac0;
        border-bottom: 1px solid #ebdac0;
        border-right: 1px solid #d6bb86;
        border-left: 1px solid #d6bb86;
    }
-->
</style>
</head>

<body>
<center>
<select name="amount_no1" class="myselectbox" id="amount_no1" >
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
              <option value="6">6</option>
              <option value="7">7</option>
              <option value="8">8</option>
</select> 
</center>
</body>


This is normal behaviour and is controlled by the browser. You could look for some javascript replacement solutions for your select elements, or you could split up the amount of options over a number of selects. The most important thing is user accessibility when it comes to forms, if it is too big to display all options, make it smaller :)


I agree, this must be a bug in Firefox. (I was able to get it without any CSS at all at one point, just having the right number of options.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜