HTML Form How to - Make a custom select option menu style without image








Question

We would like to know how to make a custom select option menu style without image.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
select {<!--   ww w  .j  a  v  a  2 s.com-->
  -webkit-appearance: none;
  border: 0;
  padding-right: 30px;
}

p {
  display: inline;
  margin-left: -30px;
}
</style>
</head>
<body>
  <select>
    <option>Select</option>
    <option>value 1</option>
    <option>value 2</option>
  </select>
  <p>*</p>
</body>
</html>

The code above is rendered as follows: