allow multi-select lists in forms

This commit is contained in:
Mark Otto 2011-09-14 08:58:20 -07:00
parent 32a690af98
commit dcf6a051e7
4 changed files with 22 additions and 1 deletions

5
bootstrap-1.3.0.css vendored
View File

@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Tue Sep 13 22:22:48 PDT 2011
* Date: Wed Sep 14 08:56:48 PDT 2011
*/
/* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
@ -676,6 +676,9 @@ select, input[type=file] {
/* For IE7, add top margin to align select with labels */
}
select[multiple] {
height: inherit;
}
textarea {
height: auto;
}

View File

@ -117,6 +117,7 @@ input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3
input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
select,input[type=file]{height:27px;line-height:27px;*margin-top:4px;}
select[multiple]{height:inherit;}
textarea{height:auto;}
.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
:-moz-placeholder{color:#bfbfbf;}

View File

@ -1005,6 +1005,18 @@
</select>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="multiSelect">Multiple select</label>
<div class="input">
<select class="medium" multiple="multiple" name="multiSelect" id="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label>Uneditable input</label>
<div class="input">

View File

@ -110,6 +110,11 @@ input[type=file] {
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
}
// Make multiple select elements height not fixed
select[multiple] {
height: inherit;
}
textarea {
height: auto;
}