Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">
  <br/>
  <h1>Bootstrap Select - diablo3 style</h1><br/>
  <div class="row">
    <div class="col-md-6">
      <h3>Single select // character selection :</h3>
      <select class="d3-select form-control" id="character-selection" data-live-search="false">
          <option value="barbarian" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/barbarianmale.png'>Barbarian">Barbarian</option>
          <option value="crusader" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/crusadermale.png'>Crusader">Crusader</option>
        <option value="demon-hunter" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/demon-huntermale.png'>Demon Hunter">Demon Hunter</option>                  <option data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/monkmale.png'>Monk" value="Monk" >Monk</option>
       <option value="necromancer" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/necromancermale.png'>Necromancer">Necromancer</option>
       <option value="witch-doctor" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/witch-doctormale.png'>Witch Doctor">Witch Doctor</option>
        <option value="wizard" data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/wizardmale.png'>Wizard">Wizard</option>
      </select>
    </div>
  </div>
  <div class="row">
    <div class="col-md-6">
      <br/><br/>
      <h3>Multiple select // Conquest selection :</h3>
      <select class="d3-select form-control" title="Choose a conquest..." multiple data-selected-text-format="count > 1" data-count-selected-text= "{0} conquests selected" data-size="auto">
         <option data-content="<img class='img-flag' src='https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/wizardmale.png'>Race to the top" value="Race to the top">Race to the top</option>
         <option value="Living Dangerously">Living Dangerously</option>
         <option value="It's A Marathon...">It's A Marathon...</option>       
         <option value="Better Lucky Than Good">Better Lucky Than Good</option>
        <option value="Divinity">Divinity</option>
       <option value="Lionhearted" data-subtext="Hardcore">Lionhearted</option>
        <option value="Sprinter">Sprinter</option>
        <option value="Speed Racer">Speed Racer</option>
        <option value="Death Gets Got">Death Gets Got</option>
       <option value="Sprinter">Top Spot</option>
       <option value="Now You've Done It">Now You've Done It</option>
       <option value="Now You've Really Done It">Now You've Really Done It</option>
        <option value="The Thrill">The Thrill</option>
        <option value="Super Human">Super Human</option>
        <option value="On a good day">On a good day</option>
        <option value="I can't stop">I can't stop</option>
         <option value="Avarice">Avarice</option>
       <option value="Avaritia">Avaritia</option>                             
      </select>
    </div>
  </div>
</div>
            
          
!
            
              /*
Make bootstrap-select work with bootstrap 4 see:
https://github.com/silviomoreto/bootstrap-select/issues/1135
*/

:focus{
  outline:none;
}

.bootstrap-select .dropdown-toggle:focus{
  outline:none !important;
  box-shadow:none;
}

.dropdown-toggle.btn-default {
  color: #292b2c;
  background-color: #fff;
  border-color: #ccc;
}
.bootstrap-select.show > .dropdown-menu > .dropdown-menu {
  display: block;
  height:100%;
}
.bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden {
  display: none;
}
.bootstrap-select > .dropdown-menu > .dropdown-menu li a {
  display: block;
  width: 100%;
  padding: 3px 1.5rem;
  clear: both;
  font-weight: 400;
  color: #292b2c;
  text-align: inherit;
  white-space: nowrap;
  background: 0 0;
  border: 0;
  text-decoration: none;
}
.bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover {
  background-color: #f4f4f4;
}
.bootstrap-select > .dropdown-toggle {
  width: 100%;
}
.dropdown-menu > li.active > a {
  color: #fff !important;
  background-color: #337ab7 !important;
}
.bootstrap-select .check-mark {
  line-height: 14px;
}


.bootstrap-select .check-mark::after {
  font-family: "FontAwesome";
  content: "\f00c";
}
.bootstrap-select button {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Make filled out selects be the same size as empty selects */
.bootstrap-select.btn-group .dropdown-toggle .filter-option {
  display: inline !important;
}

/*customized*/

 .img-flag {
    height: 26px;
    width: 26px;
   margin-top:-4px;
   margin-right:5px;
}

.bootstrap-select.btn-group > .dropdown-menu {
    width: calc(100% + 14px);
    margin-left: -7px;
    height:200px;
}

.bootstrap-select > .dropdown-menu > .dropdown-menu li.selected a{
    background-color:#810102;
    color:white;
}

.bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover{
    background-color:#da7e01;
    color:white;
}

.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{
  display:none;
}

.dropdown-menu, .bootstrap-select.form-control{
  border:none;
 padding-top: 0px;
  padding-bottom:0px;
  /*max-height:200px !important;*/
    border-radius: 0;
  font-weight:400;
        border-style: solid;
    border-width: 7px 7px 7px 7px;
    -moz-border-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/scrolldown.png) 7 7 7 7 fill stretch repeat;
    -webkit-border-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/scrolldown.png) 7 7 7 7 fill stretch repeat;
    -o-border-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/scrolldown.png) 7 7 7 7 fill stretch repeat;
    border-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/scrolldown.png) 7 7 7 7 fill stretch repeat;
    background:none;
}

.bootstrap-select > .dropdown-menu > .dropdown-menu li a{
    color:#b3a684;
}

.bootstrap-select > .dropdown-menu > .dropdown-menu li a{
  padding:6px;
  
}

.bootstrap-select.form-control{
  height:44px;
}

.bootstrap-select.form-control .btn{
  background:none;
  color:white;
  border:none;
  padding:3px;
  padding-right:25px;
  font-size:18px;
}

.bootstrap-select.btn-group .dropdown-toggle .bs-caret{
  position:absolute;
   top: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    margin-right: -1px;
    width: 32px;
    height: 32px;
    background: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/ScrolldownButton.png);
    background-position: left top;
}

.bootstrap-select.btn-group .dropdown-toggle:hover .bs-caret{
   background-position: left center;
}

.bootstrap-select.btn-group .dropdown-toggle:active .bs-caret{
   background-position: left bottom;
}

.bootstrap-select.show .dropdown-toggle .bs-caret{
   background-position: center top;
}

.bootstrap-select.show .dropdown-toggle:hover .bs-caret{
   background-position: center center;
}

.bootstrap-select.show .dropdown-toggle:active .bs-caret{
   background-position: center bottom;
}


/*scroll*/

.mCSB_inside>.mCSB_container{
        margin-right:38px;
    }

   .mCSB_inside>.mCSB_container{
    margin-right:34px;
   }

   .mCSB_scrollTools{
        width:33px;
        min-height:10px;
        opacity:1;
    }

     .mCSB_scrollTools .mCSB_buttonUp{
        background-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/ScrollArrowBottom.png);
        width:33px;
        height:33px;
        left:0;
        right:0;
        margin:auto;
        background-position:right top !important;
        opacity:1;
    }


     .mCSB_scrollTools .mCSB_buttonDown{
        background-image: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/ScrollArrowBottom.png);
        width:33px;
        height:33px;
        left:0;
        right:0;
        margin:auto;
        background-position:left top !important;
        opacity:1;
    }

   .mCSB_scrollTools .mCSB_buttonUp:hover{
        background-position:right -33px !important;
    }

    .mCSB_scrollTools .mCSB_buttonDown:hover{
        background-position:left -33px !important;
    }

    .mCSB_scrollTools .mCSB_buttonUp:active{
        background-position:right -66px !important;
    }

   .mCSB_scrollTools .mCSB_buttonDown:active{
        background-position:left -66px !important;
    }

     .mCSB_scrollTools a+.mCSB_draggerContainer{
        margin-top:35px;
        margin-bottom:33px;
    }

     .mCS-light-2.mCSB_scrollTools .mCSB_draggerRail{
        width:100%;
        background:url("https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/scrollbar-vertical.png");
    }

.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
    width: 100%;
    background: url(https://raw.githubusercontent.com/cromartie1984/diablo3-project/master/ScrollButton.png);
    background-position: left top !important;
}
     .mCSB_scrollTools .mCSB_dragger{
        width:25px;
        height: 35px;
        left:0;
        right:0;
        margin:auto;
    }
            
          
!
            
              $('.d3-select').selectpicker();

$('.d3-select').on('shown.bs.select', function (e) {
  $(this).find('.dropdown-menu.inner').mCustomScrollbar({
            scrollButtons:{
                    enable:true,
                    scrollAmount : "auto",
                    scrollType: "stepless" 
                },
                keyboard:{ 
                    enable: true,
                    scrollAmount : "auto",
                    scrollType: "stepless" 
                },
                autoDraggerLength: false,
                autoHideScrollbar : false,
                autoExpandScrollbar : false,
                snapAmount : 5,
                alwaysShowScrollbar : 0 ,
                mouseWheel:{ 
                    disableOver: ["select","option","keygen","datalist","textarea"],
                    deltaFactor : "100"
                },
                theme : "light-2"
        });

});

$('.d3-select').on('hide.bs.select', function (e) {
       $(this).find('.dropdown-menu.inner').mCustomScrollbar('destroy');
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console