Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section id="alterationForm1">
  <div class="card">
     <div class="imgPreview" class="text-center">
      <div class="imgCard">
       <input type="file" name="front_image" id="front-image-upload" />
    </div>
    </div>
    <!--Dropdown List-->
    <div class="form-group">
      <label for="exampleFormControlSelect1"><p class="dropDownLabel">Select alteration type</p></label>
      <select class="form-control alterationTypeSelect" name="alterationTypeSelect">
                      <option value="button">Button</option>
                      <option value="stitching">Stitching</option>
                      <option value="cloth">Cloth</option>
                      <option value="fabrics">Fabrics</option>
                      <option value="otherClick">Other</option>
                    </select>
    </div>
    <div class="hideMe textBoxDiv">
      <div class="form-group">
        <label for="exampleFormControlTextarea1">Additional alteration details</label>
        <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
      </div>
    </div>
    <!--text box div-->
    <div class="submitButton text-center">
      <a href="#" class="btn btn-success btn-pill">Submit</a>
    </div>
    <!--submitButton-->
  </div>
  <!--card-->
</section>
<!--alteration form-->
<div class="demoClass">
  <div class="card" data-duplicate="demo">
    <div class="imgCard" value="imageArea">
       <input type="file" name="front_image" id="front-image-upload" />
    </div>
    <!--Dropdown List-->
    <div class="form-group">
      <label for="exampleFormControlSelect1"><p class="dropDownLabel">Select alteration type</p></label>
      <select class="form-control alterationTypeSelect" name="alterationTypeSelect">
                      <option value="button">Button</option>
                      <option value="stitching">Stitching</option>
                      <option value="cloth">Cloth</option>
                      <option value="fabrics">Fabrics</option>
                      <option value="otherClick">Other</option>
                    </select>
    </div>
    <div class="hideMe textBoxDiv">
      <div class="form-group">
        <label for="exampleFormControlTextarea1">Additional alteration details</label>
        <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
      </div>
    </div>
    <!--text box div-->
    <div class="submitButton text-center">
      <a href="#" class="btn btn-success btn-pill">Submit</a>
    </div>
    <!--submitButton-->
  </div>
  <!--card-->
  <div id="addOnButton" class="text-center">
    <button class="btn-danger btn-sm" data-duplicate-add="demo">Add More</button>
  </div>
</div>
<!--demo class-->
              
            
!

CSS

              
                /*gobal*/
body,
html{
    padding: 0 1rem;
    margin: 0;
    height: 100%;
}
#alteration{
    padding: 1rem 0 0;
}
.hideMe{
    display: none;
}
.hideMe2{
    display: none;
}
h3{
    font-family: 'Open Sans', sans-serif;
}
p{
    margin: 0;
    padding: 0;
}
#addOnButton .btn-danger{
    margin: 1rem 0;
}
/*Alteration Section*/
/*spans*/
.imgCard i, .imgCard2 i{
    font-size: 1.3rem;
}
/*Cards*/
.card{
    padding: .5rem;
    width: 100%;
    margin-bottom: 1rem;
    text-align: center;
}
.dropdown-el {
  width: 100%;
  position: relative;
  display: inline-block;
  max-height: 2em;
  overflow: hidden;
  top: .5em;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  color: #444;
  outline: none;
  border: .06em solid transparent;
  border-radius: 1em;
  background-color: #cde4f5;
  transition: 0.3s all ease-in-out;
}
.dropdown-el input {
  display: none;
}
.dropdown-el label {
  border-top: .06em solid #d9d9d9;
  display: block;
  height: 2em;
  line-height: 2em;
  padding-left: 1em;
  padding-right: 3em;
  cursor: pointer;
  position: relative;
  transition: 0.3s color ease-in-out;
}
.dropdown-el label:nth-child(2) {
  margin-top: 2em;
  border-top: .06em solid #d9d9d9;
}
.dropdown-el input:checked + label {
  display: block;
  border-top: none;
  position: absolute;
  top: 0;
}
.dropdown-el input:checked + label:nth-child(2) {
  margin-top: 0;
  position: relative;
}
.dropdown-el::after {
  content: "";
  position: absolute;
  right: 0.8em;
  top: 0.9em;
  border: 0.3em solid #3694d7;
  border-color: #3694d7 transparent transparent transparent;
  transition: .4s all ease-in-out;
}
.dropdown-el.expanded {
  border: 0.06em solid #3694d7;
  background: #fff;
  border-radius: .25em;
  padding: 0;
  box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 5px 0px;
  max-height: 15em;
}
.dropdown-el.expanded label {
  border-top: .06em solid #d9d9d9;
}
.dropdown-el.expanded label:hover {
  color: #3694d7;
}
.dropdown-el.expanded input:checked + label {
  color: #3694d7;
}
.dropdown-el.expanded::after {
  transform: rotate(-180deg);
  top: .55em;
}
/*Dropdown el2*/
.dropdown-el2 {
  width: 100%;
  position: relative;
  display: inline-block;
  max-height: 2em;
  overflow: hidden;
  top: .5em;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  color: #444;
  outline: none;
  border: .06em solid transparent;
  border-radius: 1em;
  background-color: #cde4f5;
  transition: 0.3s all ease-in-out;
}
.dropdown-el2 input {
  display: none;
}
.dropdown-el2 label {
  border-top: .06em solid #d9d9d9;
  display: block;
  height: 2em;
  line-height: 2em;
  padding-left: 1em;
  padding-right: 3em;
  cursor: pointer;
  position: relative;
  transition: 0.3s color ease-in-out;
}
.dropdown-el2 label:nth-child(2) {
  margin-top: 2em;
  border-top: .06em solid #d9d9d9;
}
.dropdown-el2 input:checked + label {
  display: block;
  border-top: none;
  position: absolute;
  top: 0;
}
.dropdown-el2 input:checked + label:nth-child(2) {
  margin-top: 0;
  position: relative;
}
.dropdown-el2::after {
  content: "";
  position: absolute;
  right: 0.8em;
  top: 0.9em;
  border: 0.3em solid #3694d7;
  border-color: #3694d7 transparent transparent transparent;
  transition: .4s all ease-in-out;
}
.dropdown-el2.expanded2 {
  border: 0.06em solid #3694d7;
  background: #fff;
  border-radius: .25em;
  padding: 0;
  box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 5px 0px;
  max-height: 15em;
}
.dropdown-el2.expanded2 label {
  border-top: .06em solid #d9d9d9;
}
.dropdown-el2.expanded2 label:hover {
  color: #3694d7;
}
.dropdown-el2.expanded2 input:checked + label {
  color: #3694d7;
}
.dropdown-el2.expanded2::after {
  transform: rotate(-180deg);
  top: .55em;
}
.imgCard{
    background: url(http://abhisheksuresh.online/alter/assets/uploadImage.svg)center center no-repeat;
    height: 128px;
/*    width: 128px;*/
    background-size: cover;
    position: relative;
    overflow: hidden;
}
.imgCard input {
  line-height: 128px;
  font-size: 128px;
  position: absolute;
  opacity: 0;
  z-index: 10;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
/*
.imgCard label {
  position: absolute;
  z-index: 5;
  opacity: 0.8;
  cursor: pointer;
  background-color: #bdc3c7;
  width: 100px;
  height: 50px;
  font-size: 10px;
  line-height: 50px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  text-align: center;
}
*/

              
            
!

JS

              
                //question mark tooltip
$('[data-toggle="tooltip"]').tooltip();

//uploading image
  $.uploadPreview({
    input_field: "#front-image-upload",   // Default: .image-upload
    preview_box:  ".imgCard",    // Default: .image-label
	label_default: "Choose File",   // Default: Choose File
    label_selected: "Change File",  // Default: Change File
    no_label: false                 // Default: false
  });

//Dynamically adding when clicked on the "Add more" button
$('body').on('change', '.alterationTypeSelect', function () {
    var val = $(this).val();
    if (val === 'otherClick') {
        $(this).parent().parent().find('.textBoxDiv').removeClass('hideMe');
    } else {
        $(this).parent().parent().find('.textBoxDiv').addClass('hideMe');
    }   
});

//Dynamic Adding
$("#czContainer").czMore();
              
            
!
999px

Console