<div class="page-centered">
  <h1>Pure CSS Select Component</h1>
  
  <div class="row">
    <div class="c-select">
      <label class="c-select__label" for="c-select--1">CSS select</label>
      <div class="c-select__wrapper">
        <select class="c-select__element" name="c-select--1" id="c-select--1">
          <option>Choose an option</option>
          <option value="1">CSS Rocks</option>
          <option value="2">Sometimes you don't need JS</option>
          <option value="3">Cool! :)</option>
        </select>
      </div>
    </div>
  </div>
  
  <div class="row">
    <div class="c-select is-disabled">
      <label class="c-select__label" for="c-select--1">Disabled select</label>
      <div class="c-select__wrapper">
        <select class="c-select__element" name="c-slect--1" id="c-slect--1" disabled>
          <option>Choose an option</option>
          <option value="1">CSS Rocks</option>
          <option value="2">Sometimes you don't need JS</option>
          <option value="3">Cool! :)</option>
        </select>
      </div>
    </div>
  </div>
</div>
/* -------------------------------------------------------------------------
* Select
*
*/

.c-select {
}

.c-select__label {
  font-size: 15px;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.c-select__wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  background: #fff;
  overflow: hidden;
  border-radius: 3px;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: #0080ab;
    pointer-events: none;
    z-index: 1;
  }

  &::after {
    content: '';
    position: absolute;
    display: block;
    width: 8px;
    height: 8px;
    border: solid #ffda1a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-50%);
    pointer-events: none;
    top: 40%;
    right: 18px;
    z-index: 1;
  }
}

.c-select__element {
  appearance: none;
  outline: 0;
  box-shadow: none;
  background: #fff;
  margin: 0;
  text-indent: 0;
  font-size: 13px;
  color: #2a2628;
  border: 1px solid #ccc;
  border-radius: 3px;
  width: 100%;
  padding: 0 60px 0 15px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  cursor: pointer;


  &::-ms-expand {
    display: none;
  }
}


// States
// -------------------------------------------------

// Disabled
.c-select.is-disabled {
  .c-select__wrapper {
    opacity: .5;
  }

  .c-select__element {
    pointer-events: none;
  }
}




/*-------------------------------------------------------
 * States
 *
 */

// Disabled
.c-select.is-disabled {
  .c-select__wrapper {
    opacity: .5;
  }
  
  .c-select__element {
    pointer-events: none;
  }
}

/*-------------------------------------------------------
 * Demo styles
 *
 */

body {
  box-sizing: border-box;
  background-color: #f3f7f8;
  padding: 30px;
  font-family: sans-serif;
}

h1 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.row {
  margin-bottom: 30px;
}

.page-centered {
  width: 300px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.