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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> 

<a href = "https://www.gabrielajohnson.com/portfolio" id = "gabby-icon" target="_blank">G</a>

<div class="form-container"> 
     <ul id="accordion">
          <li class="active">
              <div id="form-bar">
                  <h2>Tab 1</h2>
              </div>
          <div class="form-info-container">
             <div class="form-info row col-md-8 col-sm-8">
                <strong class="fh">Tab 1</strong><br>
             
             <div class = "col-md-8">
                <label>Last name</label>             
                <input type="text" placeholder="Last Name">
             </div>                                   
      </div>
            
            <div class="buttons">
                <div></div>
                <div class="page-count">Pages</div>
                <i class="fa fa-angle-right next-button"></i>
            </div>
         </div>
       </li>
       
       <li>
             <div id="form-bar">
                  <h2>Tab 2</h2>
              </div>
          <div class="form-info-container">
                <div class="form-info row col-md-8 col-sm-8">
                <strong class="fh">Tab 2</strong><br>
            
              <div class = "col-md-8">     
                 <label>First name</label>           
                <input type="text" placeholder="First name">
              </div>

      </div>          
            <div class="buttons">
                <i class="fa fa-angle-left prev-button"></i>
                <div class="page-count">Pages</div>
                <i class="fa fa-angle-right next-button"></i>
            </div>
         </div>
       </li>
        <li>
                 <div id="form-bar">
                     <h2>Tab 3</h2>
                 </div>
                <div class="form-info-container">
                <div class="form-info col-md-8 col-sm-8">
                    <strong class="fh">Tab 3</strong><br>
                        <div class = "col-md-8">
                      <label>Last name</label>                        <input type="text" placeholder="Last Name">
                       </div>
                </div>
                    <div class="buttons">
                    	<i class="fa fa-angle-left prev-button"></i>
                  <div class="page-count">Pages</div>
                        <i class="fa fa-angle-right next-button"></i>
                    </div>
               </div>
              </li>
              <li>
                 <div id="form-bar">
                     <h2>Tab 4</h2>
                 </div>
                <div class="form-info-container">
                <div class="form-info col-md-8 col-sm-8">
                    <strong class="fh">Tab 4</strong><br>
                        <div class = "col-md-8">
                      <label><span>Last name</span></label>                        <input type="text" placeholder="Last Name">
                       </div>
                </div>
                    <div class="buttons">
                    	<i class="fa fa-angle-left prev-button"></i>
                        <div class="page-count">Page 1 of 5</div>
                      <button type = "submit">Submit</button>
                    </div>
               </div>
            </li>
                    
            </ul>

</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Open+Sans');


html{
  margin:10px;
}

label{
  color: #1c487b;
  margin: 0;
  font-weight:bold;
  padding:2px;
  display:block;
}

.fa-angle-left, .fa-angle-right{
    color:#1c487b;
}

button[type="submit"]{
    padding-left: 10px;
    padding-right: 10px; 
    border-radius:10px;
    color:#1c487b;
    margin-right:10px;
    background: linear-gradient(#e9eef0,white,#e9eef0);
}

.close{
  cursor:pointer;
  padding: 1px;
}

.form-container{
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
  height: 100%;
  max-width:none;
}

#accordion {
  display:flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 500px;
  overflow: hidden;
}

#accordion::after {
  content: '';
  position: relative;
  background: rgb(28,72,123);
  width: 30px;
  height: 500px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

#accordion .form-info-container{
  height: 100%;
  background: #bbb7b2;
  background: url("https://lh3.googleusercontent.com/MGJR92pPVz_MBmOk9u1h6ANvq-T_5twZDQbzCgRZFqyNnnEAyj6uD57hiSm2xC1X8lLO6qqOl2sUKcNoNGCXBYrx6A4L7pLWJdTjXamEAgmnymolYwszt1tvndmuKlQDvG2l4pniH6h2W0jPmqFqmBCEuG__ZFJNNJaDH9_3v3k3UwpPtYgwxLm2FWhzFRUakEx2VvljWRxs1bRXjdDBe3r-yiX_VoojFyhtWwIzsukSzdkQ8CIvmIYMBNq0oT6X-_HtJn66bgOtfPMVrIMxVbkdj2UKH9yTS9gmJ5If9cFze5aPEx5FfTRoWIAb2bQHVrU8QT9o6Fck55hDd8PyEOKhpiAHUklHnQIVjm5ELNPBxoCyp87Ji2NFwVrXqN2d7u3_DmQfafAts5gfK75KQvhoTgJiRlyD2eOeRV2Arp7eJhriOtKgYB69nkk-aUj-b2H59YqYZZ5iSus7ETmP3pSh2i3uFh7-DgrCLg_5xxKv2mt3fDDXVOYcFwsicKFs3EFG7HDgUa5trvYMWWIQagZ-a5iWG0OxhevMMri1-D41O7nWwfv02bVPOsAtgUD68JE1fP4X93ptKmUueJrP0oTPCXz0mX6NQzvYIJQ7hGgHls7CjXygL3mOJPPNjgwy2-oL_F5gge0x37CacizHGpVyNZPktKWi9I98Jaahm4Yww06czpFMo7Fckm5aOhUgFUFJ5Txg0rZHbrvGJ4cfyNV9gjmTEETcFtX3pQ=w1275-h578-no");
  box-shadow: inset 0px 0px 21px 0px rgba(74, 74, 74, 0.11);
  border-bottom-left-radius: 10px;
  position: relative;
}

#accordion .form-info-container::before{
  content:'';
  position:absolute;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.15);
}

#accordion .save{
  background: linear-gradient(to bottom, rgba(255,255,255,1) 46%,rgba(224,224,224,1) 64%,rgba(243,243,243,1) 100%);
  border: 0;
  outline: 0;
  cursor: pointer;
  border: 1px solid #b7b7b7;
  box-shadow: inset 0 0 30px rgba(255,255,255,.8), 0 1px 6px rgba(0,0,0,.31);
  padding: .857em 2.2em .857em 4em;
  border-radius: 2em;
  width:20px;
}

#accordion .page-count{
  color: #1c487b;
  font-weight: bold;
}

.form-info-container .buttons{
  display: block;
  width: 100%;
  position: relative;
  top: -50px;
  display:flex;
  justify-content: space-between;
  padding-left: 50px;
  align-items:center;
}

.buttons .prev-button{
  margin-left: 20px;
  background: white;
  padding: 1px 5px;
  border-radius: 50%;
  cursor:pointer;
}

.buttons .next-button{
  margin-right: 20px;
  background: white;
  padding: 1px 5px;
  border-radius: 50%;
  cursor:pointer;
}

#accordion .form-info{
  padding:20px;
  margin-left:50px;
  padding-right: 40px;
  position:absolute;
}

#accordion .form-info .fh{
  font-size: 30px;
  font-family: 'Open Sans', sans-serif;
  color: rgb(28, 72, 123);
  font-weight: bold;
  line-height: 1.333;
  background:none;
  width:100%;
}

#accordion li {
  float: left;
  display: block;
  height: 100%;
  width: 50px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5em;
  transition: width 0.3s 0s;
}

#accordion li.active {
  width: 80%;
}

#form-bar::before{
  content:'';
  position:absolute;
  width:100%;
  height:100%;
  background:repeating-linear-gradient(45deg,transparent 4px,transparent 5px, lightgrey 10px);
}

#form-bar{
  min-width:50px;
  border-radius:10px 0 0 10px;
  background:linear-gradient(to right,white 50%,
#bebebe);
  background-size:cover;
  display: block;
  border: none;
  border-right: 1px solid #fff;
  float: left;
  height: 100%;
  box-shadow: 4.988px 0.349px 4px 0px rgba(0, 0, 0, 0.2);
  position:relative;
  z-index:1;
}

#form-bar h2{
  writing-mode: vertical-rl;
  font-size: 22px;
  font-family: 'Open Sans', sans-serif;
  color: rgb(28, 72, 123);
  font-weight: bold;
  line-height: 1.2;
  transform: rotate(180deg);
  height: 100%;
  text-indent:10px;
  padding-right:10px;
  margin:0;
}

input{
    background:white;
    border-radius: 5px;
    border: none;
    height: 25px;
    width:100%;
    padding:5px;
}


#gabby-icon{
  position:absolute;
  width:50px;
  height:50px;
  background:radial-gradient(#109be9,#155dca);
  bottom:0;
  right:0;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  color:white;
  font-size:30px;
  text-decoration:none;
  margin:5px;
  font-family:cursive;
  box-shadow:2px 2px 2px grey;
  z-index:1000;
}

#gabby-icon:hover{
  background:#0c83bb;
  transition:background 1s;

}


              
            
!

JS

              
                $(document).ready(function(){
  tabCounter = 0;
  accordionLength = $('ul#accordion li').length - 1;
  activeTab= $("#accordion li:first");

  function pageNumber(tabCounter){
    $(".page-count").html("Page " + (tabCounter+1) + " of " + (accordionLength+1));
  }
  
  function resize(direction){
    if(tabCounter != accordionLength && direction == "next"){   
        tabCounter ++;
        $(activeTab).css('width', '50px');
        $(activeTab).next().css('width', '80%');
        activeTab = $(activeTab).next();
    }else if(tabCounter > 0 && direction == "prev"){
         tabCounter--;
         $(activeTab).css('width', '50px');
         $(activeTab).prev().css('width', '80%');
         activeTab = $(activeTab).prev();
    }
  }
  
  pageNumber(tabCounter);
  
   $("#accordion #form-bar").click(function(){
     tabCounter = $( "#accordion #form-bar" ).index( this );
     $(activeTab).css('width', '50px');
     $(this).parent().css('width', '80%');
     activeTab = $(this).parent();
     pageNumber(tabCounter);
    });

 $(".next-button").click(function(){    
         resize("next");
         pageNumber(tabCounter); 
 });

 $(".prev-button").click(function(){
        resize("prev");
        pageNumber(tabCounter);
 });

       var onKeyDown = function ( event ) {
        switch ( event.keyCode ) {
          case 39:
                resize("next");
                pageNumber(tabCounter);
            break;      
          case 37:
              resize("prev");
              pageNumber(tabCounter);       
            break;
        }
      };
      document.addEventListener( 'keydown', onKeyDown, false );
});
              
            
!
999px

Console