multiselect.css 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* Copyright (c) 2011, Jan-Christoph Borchardt, http: //jancborchardt.net
  2. This file is licensed under the Affero General Public License version 3 or later.
  3. See the COPYING-README file. */
  4. ul.multiselectoptions {
  5. background-color: #fff;
  6. border: 1px solid #ddd;
  7. border-top: none;
  8. box-shadow: 0 1px 1px #ddd;
  9. padding-top: 8px;
  10. position: absolute;
  11. max-height: 20em;
  12. overflow-y: auto;
  13. z-index: 49;
  14. }
  15. ul.multiselectoptions.down {
  16. border-bottom-left-radius: 8px;
  17. border-bottom-right-radius: 8px;
  18. width: 100%; /* do not cut off group names */
  19. -webkit-box-shadow: 0px 0px 20px rgba(29,45,68,.4);
  20. -moz-box-shadow: 0px 0px 20px rgba(29,45,68,.4);
  21. box-shadow: 0px 0px 20px rgba(29,45,68,.4);
  22. }
  23. ul.multiselectoptions.up {
  24. border-top-left-radius: 8px;
  25. border-top-right-radius: 8px;
  26. }
  27. ul.multiselectoptions>li {
  28. overflow: hidden;
  29. white-space: nowrap;
  30. }
  31. ul.multiselectoptions > li > input[type="checkbox"] {
  32. margin: 10px 7px;
  33. vertical-align: middle;
  34. }
  35. ul.multiselectoptions > li input[type='checkbox']+label {
  36. font-weight: normal;
  37. display: inline-block;
  38. width: 100%;
  39. padding: 5px 27px;
  40. margin-left: -27px; /* to have area around checkbox clickable as well */
  41. }
  42. ul.multiselectoptions > li input[type='checkbox']:checked+label {
  43. font-weight: bold;
  44. }
  45. div.multiselect, select.multiselect {
  46. display: inline-block;
  47. max-width: 400px;
  48. min-width: 150px;
  49. padding-right: 10px;
  50. min-height: 20px;
  51. position: relative;
  52. vertical-align: bottom;
  53. }
  54. /* To make a select look like a multiselect until it's initialized */
  55. select.multiselect {
  56. height: 30px;
  57. min-width: 113px;
  58. }
  59. div.multiselect.active {
  60. background-color: #fff;
  61. position: relative;
  62. z-index: 50;
  63. }
  64. div.multiselect.up {
  65. border-top: 0 none;
  66. border-top-left-radius: 0;
  67. border-top-right-radius: 0;
  68. }
  69. div.multiselect.down {
  70. border-bottom: none;
  71. border-bottom-left-radius: 0;
  72. border-bottom-right-radius: 0;
  73. }
  74. div.multiselect>span:first-child {
  75. float: left;
  76. margin-right: 32px;
  77. overflow: hidden;
  78. text-overflow: ellipsis;
  79. width: 90%;
  80. }
  81. div.multiselect>span:last-child {
  82. position: absolute;
  83. right: 13px;
  84. }
  85. ul.multiselectoptions input.new {
  86. padding-bottom: 3px;
  87. padding-top: 3px;
  88. margin: 0;
  89. }
  90. ul.multiselectoptions > li.creator {
  91. padding: 10px;
  92. font-weight: bold;
  93. }
  94. ul.multiselectoptions > li.creator > input {
  95. width: 95% !important; /* do not constrain size of text input */
  96. padding: 5px;
  97. margin: -5px;
  98. }
  99. .ie8 div.multiselect span:first-child {
  100. display:block;
  101. position:relative;
  102. width: 90%;
  103. margin-right:-1px;
  104. }