0

How to add below style to below ListBox,

@Html.ListBoxFor(m => m.AvailableProducts, new MultiSelectList(Model.AvailableProducts, "Id", "Name", Model.AvailableSelected),
                         new Dictionary<string, object> { { "data-bind", "options:availableProducts, selectedOptions:availableSelected, optionsText:'Name'" } })

CSS

div.selectbox-wrapper ul {
list-style-type:none;
margin:0px;
padding:0px;
}
div.selectbox-wrapper ul li.selected { 
background-color: #EAF2FB;
}
div.selectbox-wrapper ul li.current { 
background-color: #CDD8E4;
}
div.selectbox-wrapper ul li {
list-style-type:none;
display:block;
margin:0;
padding:2px;
cursor:pointer;
}
user584018
  • 10,186
  • 15
  • 74
  • 160

1 Answers1

0

Use a jQuery plugin to change the <select> element to a <div> with <ul>'s and <li>'s.

Example is here: Is it possible to style a select box?

Community
  • 1
  • 1
Joey Gennari
  • 2,361
  • 17
  • 26