BobTheFisherman wrote:
JimHdk wrote:
BobTheFisherman wrote:
The size attribute is supported in all major browsers, except Google Chrome and Safari.
Source:
http://www.w3schools.com/tags/attselectsize.asp
The size attribute is supported as usual in Mac OS Safari. In mobile Safari the size attribute does not produce a multiple element list but, rather, a pop-list with multiple elements. The appearance is different but the functionality is the same.
Using your Safari browser --- Compare this result using Safari OSx
http://www.w3schools.com/tags/tryit.asp?filename=tryhtmlselectsize results in 4 items in dropdown.
and using your Firefox browser this result using FireFox
http://www.w3schools.com/tags/tryit.asp?filename=tryhtmlselectsize results in 2 items in dropdown.
You will notice that Safari does not support the size attribute of the select tag which in this case was "2".
Message was edited by: BobTheFisherman
The reason that Mac OS Safari displays 4 items in the example you cite is because the minimum number of items in a selection list that Safari will display is 4. If you try the following example where size is set to 5 and there are seven list items you will see that Safari does, indeed, support the size attribute (with the lower limit of 4).
Here 5 is specified as the size and only 5 items (of the seven given) will be displayed.
<html>
<body>
<select size="5">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
<option value="ford">Ford</option>
<option value="mercury">Mercury</option>
<option value="lincoln">Lincoln</option>
</select>
</body>
</html>