Answers for "select dropdown styling"

CSS
4

style a <select> dropdown

select {
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
   background-image: url(...);
}
select::-ms-expand {
    display: none;
}
@media screen and (min-width:0) {
    select {
        background-image:none9;
        padding: 5px9;
    }
}
Posted by: Guest on October-02-2021
0

how to add a selection in css

.custom-select-wrapper {
     position: relative;
     user-select: none;
     width: 100%;
}
 .custom-select {
     position: relative;
     display: flex;
     flex-direction: column;
     border-width: 0 2px 0 2px;
     border-style: solid;
     border-color: #394a6d;
}
 .custom-select__trigger {
     position: relative;
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 0 22px;
     font-size: 20px;
     font-weight: 300;
     color: #3b3b3b;
     height: 60px;
     line-height: 60px;
     background: #ffffff;
     cursor: pointer;
     border-width: 2px 0 2px 0;
     border-style: solid;
     border-color: #394a6d;
}
 .custom-options {
     position: absolute;
     display: block;
     top: 100%;
     left: 0;
     right: 0;
     border: 2px solid #394a6d;
     border-top: 0;
     background: #fff;
     transition: all 0.5s;
     opacity: 0;
     visibility: hidden;
     pointer-events: none;
     z-index: 2;
}
 .custom-select.open .custom-options {
     opacity: 1;
     visibility: visible;
     pointer-events: all;
}
 .custom-option {
     position: relative;
     display: block;
     padding: 0 22px 0 22px;
     font-size: 22px;
     font-weight: 300;
     color: #3b3b3b;
     line-height: 60px;
     cursor: pointer;
     transition: all 0.5s;
}
 .custom-option:hover {
     cursor: pointer;
     background-color: #b2b2b2;
}
 .custom-option.selected {
     color: #ffffff;
     background-color: #305c91;
}
Posted by: Guest on December-10-2020
0

Select dropdown style

<select class="selectpicker">
  <option>Mustard</option>
  <option>Ketchup</option>
  <option>Relish</option>
</select>
Posted by: Guest on October-08-2021
0

how to add a selection in css

<select>
    <option value="tesla">Tesla</option>
    <option value="volvo">Volvo</option>
    <option value="mercedes">Mercedes</option>
</select">
Posted by: Guest on December-10-2020

Browse Popular Code Answers by Language