
Originally Posted by
SEMMatt
so that the display area or display box is smaller while at the same time, users are still able to make multiple selections.
Since no one has mentioned it, a select list like this will just be "one line tall" (so to speak), and the options will only appear when the user clicks on the list, if the select setting is changed from something like:
Code:
<select name="select" id="select" size="4" multiple="multiple">
to
Code:
<select name="select" id="select">
E.g (to use Paul's example):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#select {
width:200px;
background:#dddccc;
border:1px solid #000;
font-size:12px;
}
#select option {
padding:2px 5px;/* won't work in most browsers*/
}
</style>
</head>
<body>
<form id="form1" method="post" action="">
<div>
<label for="select"></label>
<select name="select" id="select">
<option value="a1">Item 1</option>
<option value="a2">Item 2 </option>
<option value="a3">Item 3 </option>
<option value="a4">Item 4 </option>
<option value="a5">Item 5 </option>
<option value="a6">Item 6 </option>
<option value="a7">Item 7 </option>
<option value="a8">Item 8 </option>
<option value="a9">Item 9 </option>
<option value="a10">Item 10 </option>
</select>
</div>
</form>
</body>
</html>
Bookmarks