Style Form Elements

In this example below you will see how to do a Style Form Elements with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by adamaoc, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright adamaoc ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Style Form Elements</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="styled-select">
<select class="custom">
  <option>Select this</option>
  <option>Option 1</option>
  <option>Option 2</option>
  <option>Option 3</option>
  <option>Option 4</option>
</select>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/adamaoc/style-form-elements-hkunp */
.styled-select select {
   background: transparent;
   width: 268px;
   padding: 5px;
   padding-left: 15px;
   font-size: 16px;
   line-height: 1;
   border: 0;
   border-radius: 0;
   height: 34px;
   -webkit-appearance: none;
   color: #555;
   }

.styled-select {
   width: 240px;
   height: 34px;
   overflow: hidden;
   background: url(http://cdn.bavotasan.com/wp-content/uploads/2011/05/down_arrow_select.jpg) no-repeat right #ddd;
   border: 1px solid #ccc;
   }

Comments