css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <p><strong>INSTRUCTIONS: </strong>To see the focus styles working, you can click on the fields or use the TAB key to navigate the forms.</p>
<p>For comments and explanations, refer to the css comments. To see all the focus style activated for comparison click here: <a href="https://codepen.io/b_atish/full/mVNode" title="focus styles exposed codepen">https://codepen.io/b_atish/full/mVNode</a></p>
<div class="col">
  <h3>Browser default</h3>
   <div>
    <label for="name">Name</label>
    <input type="text" name="name" id="name" value="" />
  </div>
  <div>
    <label for="option0">Select</label>
    <select class="select" name="option0">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea0">Textarea</label>
    <textarea cols="40" rows="8" name="textarea0" id="textarea0"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox0" id="checkbox0" value="" />
    <label class="checkbox" for="checkbox0">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio0" id="radio0a" value="" />
    <label class="radio" for="radio0a">Female</label>
    <input type="radio" name="radio0" id="radio0b" value="" />
    <label class="radio" for="radio0b">Male</label>
  </div> 
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="glow col animated styled">
  <h3>Glow animated (text shadow)</h3>
   <div>
    <label for="name">Name</label>
    <input type="text" name="name" id="name" value="" />
  </div>
  <div>
    <label for="option">Select</label>
    <select class="select" name="option">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea">Textarea</label>
    <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox" id="checkbox" value="" />
    <label class="checkbox" for="checkbox">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio" id="radioa" value="" />
    <label class="radio" for="radioa">Female</label>
    <input type="radio" name="radio" id="radiob" value="" />
    <label class="radio" for="radiob">Male</label>
  </div>  
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>
  

<div class="outline col  styled">
  <h3>Outline</h3>
  <div>
    <label for="name1">Name</label>
    <input type="text" name="name" id="name1" value="" />
  </div>
  <div>
    <label for="option1">Select</label>
    <select class="select" name="option1">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea1">Textarea</label>
    <textarea cols="40" rows="8" name="textarea1" id="textarea1"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox1" id="checkbox1" value="" />
    <label class="checkbox" for="checkbox1">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio1" id="radioa1" value="" />
    <label class="radio" for="radioa1">Female</label>
    <input type="radio" name="radio1" id="radiob1" value="" />
    <label class="radio" for="radiob1">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>


<div class="bg col styled">
  <h3>Background color</h3>
  <div>
    <label for="name2">Name</label>
    <input type="text" name="name" id="name2" value="" />
  </div>
  <div>
    <label for="option2">Select</label>
    <select class="select" name="option2">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea2">Textarea</label>
    <textarea cols="40" rows="8" name="textarea2" id="textarea2"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox2" id="checkbox2" value="" />
    <label class="checkbox" for="checkbox2">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio2" id="radioa2" value="" />
    <label class="radio" for="radioa2">Female</label>
    <input type="radio" name="radio2" id="radiob2" value="" />
    <label class="radio" for="radiob2">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border solid col styled">
  <h3>Border</h3>
  <div>
    <label for="name3">Name</label>
    <input type="text" name="name" id="name3" value="" />
  </div>
  <div>
    <label for="option3">Select</label>
    <select class="select" name="option3">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea3">Textarea</label>
    <textarea cols="40" rows="8" name="textarea3" id="textarea3"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox3" id="checkbox3" value="" />
    <label class="checkbox" for="checkbox3">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio3" id="radioa3" value="" />
    <label class="radio" for="radioa3">Female</label>
    <input type="radio" name="radio3" id="radiob3" value="" />
    <label class="radio" for="radiob3">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border dashed col styled">
  <h3>Border dashed</h3>
  <div>
    <label for="name4">Name</label>
    <input type="text" name="name" id="name4" value="" />
  </div>
  <div>
    <label for="option4">Select</label>
    <select class="select" name="option4">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea4">Textarea</label>
    <textarea cols="40" rows="8" name="textarea4" id="textarea4"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox4" id="checkbox4" value="" />
    <label class="checkbox" for="checkbox4">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio4" id="radioa4" value="" />
    <label class="radio" for="radioa4">Female</label>
    <input type="radio" name="radio4" id="radiob4" value="" />
    <label class="radio" for="radiob4">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border dotted col styled">
  <h3>Border dotted</h3>
  <div>
    <label for="name5">Name</label>
    <input type="text" name="name" id="name5" value="" />
  </div>
  <div>
    <label for="option5">Select</label>
    <select class="select" name="option5">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea5">Textarea</label>
    <textarea cols="40" rows="8" name="textarea5" id="textarea5"></textarea>
  </div>
<div>
    <input type="checkbox" name="checkbox5" id="checkbox5" value="" />
    <label class="checkbox" for="checkbox5">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio5" id="radioa5" value="" />
    <label class="radio" for="radioa5">Female</label>
    <input type="radio" name="radio5" id="radiob5" value="" />
    <label class="radio" for="radiob5">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border inset col styled">
  <h3>Border inset</h3>
  <div>
    <label for="name6">Name</label>
    <input type="text" name="name" id="name6" value="" />
  </div>
  <div>
    <label for="option6">Select</label>
    <select class="select" name="option6">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea6">Textarea</label>
    <textarea cols="40" rows="8" name="textarea6" id="textarea6"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox6" id="checkbox6" value="" />
    <label class="checkbox" for="checkbox6">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio6" id="radioa6" value="" />
    <label class="radio" for="radioa6">Female</label>
    <input type="radio" name="radio6" id="radiob6" value="" />
    <label class="radio" for="radiob6">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border outset col styled">
  <h3>Border outset</h3>
  <div>
    <label for="name7">Name</label>
    <input type="text" name="name7" id="name7" value="" />
  </div>
  <div>
    <label for="option7">Select</label>
    <select class="select" name="option7">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea7">Textarea</label>
    <textarea cols="40" rows="8" name="textarea7" id="textarea7"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox7" id="checkbox7" value="" />
    <label class="checkbox" for="checkbox7">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio7" id="radioa7" value="" />
    <label class="radio" for="radioa7">Female</label>
    <input type="radio" name="radio7" id="radiob7" value="" />
    <label class="radio" for="radiob7">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>



<div class="border ridge col styled">
  <h3>Border ridge</h3>
  <div>
    <label for="name9">Name</label>
    <input type="text" name="name9" id="name9" value="" />
  </div>
  <div>
    <label for="option9">Select</label>
    <select class="select" name="option9">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea9">Textarea</label>
    <textarea cols="40" rows="8" name="textarea9" id="textarea9"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox9" id="checkbox9" value="" />
    <label class="checkbox" for="checkbox9">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio9" id="radioa9" value="" />
    <label class="radio" for="radioa9">Female</label>
    <input type="radio" name="radio9" id="radiob9" value="" />
    <label class="radio" for="radiob9">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border groove col styled">
  <h3>Border groove</h3>
  <div>
    <label for="name10">Name</label>
    <input type="text" name="name10" id="name10" value="" />
  </div>
  <div>
    <label for="option10">Select</label>
    <select class="select" name="option10">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea10">Textarea</label>
    <textarea cols="40" rows="8" name="textarea10" id="textarea10"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox10" id="checkbox10" value="" />
    <label class="checkbox" for="checkbox10">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio10" id="radioa10" value="" />
    <label class="radio" for="radioa10">Female</label>
    <input type="radio" name="radio10" id="radiob10" value="" />
    <label class="radio" for="radiob10">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>

<div class="border double col styled">
  <h3>Border double</h3>
  <div>
    <label for="name8">Name</label>
    <input type="text" name="name8" id="name8" value="" />
  </div>
  <div>
    <label for="option8">Select</label>
    <select class="select" name="option8">
      <option value="" disabled selected>Choose your option</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
    </select>
  </div>
  <div>
    <label for="textarea8">Textarea</label>
    <textarea cols="40" rows="8" name="textarea8" id="textarea8"></textarea>
  </div>
  <div>
    <input type="checkbox" name="checkbox8" id="checkbox8" value="" />
    <label class="checkbox" for="checkbox8">Checkbox</label>
  </div>
  <div class="radio">
    <input type="radio" name="radio8" id="radioa8" value="" />
    <label class="radio" for="radioa8">Female</label>
    <input type="radio" name="radio8" id="radiob8" value="" />
    <label class="radio" for="radiob8">Male</label>
  </div>
  <div class="actions"> 
    <a href="">Cancel</a>  
    <button type="button">Submit</button>
  </div> 
</div>


            
          
!
            
              body {
  font-family: sans-serif;
}
.col{
  float: left;
  padding: 0 15px 5px;
  border: 1px solid #ddd;
  min-height: 400px;
  width: 330px;
  margin: 5px;
}
.col div{
  min-height: 30px;
}

label {
  display:block;
  margin-top: 10px;
}
label.checkbox, 
label.radio{
  display:inline;
  box-sizing: border-box;
}
input[type='text'], input[type='date'],select, textarea{
  width: 200px;
}
textarea{
  height: 50px;
}



.actions{
  padding: 25px 0 0;
}
button{
  height: 36px;
  width: 150px;
  border-radius: 15px;
  background: teal;
  color: #fff;
  float: right;
  margin-top: -15px!important;
}
h3{
  background: #ddd;
  margin: 0 -15px;
  padding: 10px;
  
}


input[type=text], 
textarea, 
select{
    padding: 3px 0px 3px 3px;
    margin: 5px 1px 3px 0px;
}
/***************************************/
/*  Reset outline: none for different fields       */
/***************************************/
  .styled input[type=text], 
  .styled textarea, 
  .styled select{
    outline: none;
    border: 1px solid #DDDDDD;
  }

  .styled input[type=checkbox],
  .styled input[type=radio],
  .styled a,
  .styled button{
    outline: none;
  }

/***************************************************/
/*   fields focus styles                           */
/***************************************************/
.animated input[type=text], 
.animated input[type=checkbox],
.animated input[type=radio],
.animated textarea,
.animated select, 
.animated a,
.animated button{
  transition: all .5s ease-in-out;
  padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
}

.glow input[type=text]:focus,
.glow select:focus,
.glow input[type=checkbox]:focus,
.glow input[type=radio]:focus,
.glow textarea:focus,
.glow a:focus,
.glow button:focus{
  box-shadow:0 0 20px rgba(81, 203, 238, 1);
  border: 1px solid rgba(81, 203, 238, 1);
}

/*outline can be different than border (more than 1 px in this case) and not alter the layout*/
.outline input[type=text]:focus, 
.outline select:focus,
.outline input[type=checkbox]:focus,
.outline input[type=radio]:focus,
.outline textarea:focus,
.outline  a:focus,
.outline button:focus{
  outline: 3px solid rgba(81, 203, 238, 1);
}
/*Radio butotns and checkboxes do not accept background color, so we can add the focus to the sibling label by "+label"*/
.bg input[type=text]:focus, 
.bg select:focus,
.bg input[type=checkbox]:focus+label,
.bg input[type=radio]:focus+label,
.bg textarea:focus,
.bg a:focus,
.bg button:focus{
  background: rgba(81, 203, 238, 1);
}

/*default border of border style fields exagerated to 3px to see the differences in styles and for border left and right not to "break the layout alignment" */
.border input[type=text], 
.border select,
.border textarea ,
.border a:focus,
.border button:focus{
  outline: none;
  padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
  border: 3px solid #DDDDDD;
}
/*Radio butotns and checkboxes do not accept border, so we can add the focus to the sibling label*/
.border input[type=checkbox]:focus+label,
.border input[type=radio]:focus+label{
  border-bottom: 3px solid #DDDDDD;
}
/*if focus border is different than border (more than 3 px in this case) it will alter the layout*/
.border.solid input[type=text]:focus, 
.border.solid select:focus,
.border.solid textarea:focus,
.border.solid a:focus,
.border.solid button:focus{
  border: 3px  solid rgba(81, 203, 238, 1);
}
      .border input[type=checkbox]:focus+label,
      .border input[type=radio]:focus+label{
        border-bottom: 3px solid rgba(81, 203, 238, 1);
      }
.border.dashed input[type=text]:focus,
.border.dashed select:focus,
.border.dashed textarea:focus,
.border.dashed a:focus,
.border.dashed button:focus{
  border: 3px dashed rgba(81, 203, 238, 1);
}
      .border.dashed input[type=checkbox]:focus+label,
      .border.dashed input[type=radio]:focus+label{
        border-bottom: 3px dashed rgba(81, 203, 238, 1);
      }
.border.dotted input[type=text]:focus,
.border.dotted select:focus,
.border.dotted textarea:focus,
.border.dotted a:focus,
.border.dotted button:focus{
  border: 3px dotted rgba(81, 203, 238, 1);
}
      .border.dotted input[type=checkbox]:focus+label,
      .border.dotted input[type=radio]:focus+label{
        border-bottom: 3px dotted rgba(81, 203, 238, 1);
      }
.border.inset input[type=text]:focus, 
.border.inset select:focus,
.border.inset textarea:focus,
.border.inset a:focus,
.border.inset button:focus{
  border: 3px inset rgba(81, 203, 238, 1);
}
      .border.inset input[type=checkbox]:focus+label,
      .border.inset input[type=radio]:focus+label{
        border-bottom: 3px inset rgba(81, 203, 238, 1);
      }
.border.outset input[type=text]:focus,
.border.outset select:focus, 
.border.outset textarea:focus,
.border.outset a:focus,
.border.outset button:focus{
  border: 3px outset rgba(81, 203, 238, 1);
}
      .border.outset input[type=checkbox]:focus+label,
      .border.outset input[type=radio]:focus+label{
        border-bottom: 3px outset rgba(81, 203, 238, 1);
      }
/*border double needs at least 3 px to be seen*/
.border.double input[type=text]:focus, 
.border.double select:focus,
.border.double textarea:focus,
.border.double a:focus,
.border.double button:focus{
  border: 3px double rgba(81, 203, 238, 1);
}
      .border.double input[type=checkbox]:focus+label,
      .border.double input[type=radio]:focus+label{
        border-bottom: 3px double rgba(81, 203, 238, 1);
      }

.border.ridge input[type=text]:focus,
.border.ridge select:focus,
.border.ridge textarea:focus,
.border.ridge a:focus,
.border.ridge button:focus{
  border: 3px ridge rgba(81, 203, 238, 1);
}
      .border.ridge input[type=checkbox]:focus+label,
      .border.ridge input[type=radio]:focus+label{
        border-bottom: 3px ridge rgba(81, 203, 238, 1);
      }
.border.groove input[type=text]:focus,
.border.groove select:focus,
.border.groove textarea:focus,
.border.groove a:focus,
.border.groove button:focus{
  border: 3px groove rgba(81, 203, 238, 1);
}
      .border.groove input[type=checkbox]:focus+label,
      .border.groove input[type=radio]:focus+label{
        border-bottom: 3px groove rgba(81, 203, 238, 1);
      }




            
          
!
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.
Loading ..................

Console