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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- fluid container, modified with a no gutter class so it go allll the way to the edge -->
<div class="slideways container-fluid no-gutter">
  <!-- the viewport for the slideshow (width of the screen / single slide) positioned absolute with hidden overflow -->
  <div id="contentContainer">
    <!--  wrapper for all of the slides -->
    <div id="wrapper">
      <!-- slides, yay! -->
      <div class="content">
        SIGN UP
      </div>

      <div class="content">
        <div class="left col-md-8 col-sm-12" style="background-image:url('http://garrett.is/wp-content/uploads/2016/06/070512_0602.jpg');"></div>
        <div class="right col-md-4 hidden-sm-down">
          <h2 class="featured-title"><a href="#">IT'S A MIRACLE!</a></h2>
          <p class="info-tag">No, it is just a pretty decent slider, do not get too excited.</p>
        </div>
      </div>


      <div class="content">
        <div class="left col-md-8 col-sm-12" style="background-image:url('http://garrett.is/wp-content/uploads/2016/05/IMG_7589.jpg');"></div>
        <div class="right col-md-4 hidden-sm-down">
          <h2 class="featured-title"><a href="#">MORE FUN</a></h2>
          <p class="info-tag">Than going to the dentist.</p>
        </div>
      </div>


      <div class="content">
        <div class="left col-md-8 col-sm-12" style="background-image:url('http://storylens.org/wp-content/uploads/2016/07/Screen-Shot-2016-07-08-at-11.19.10-PM.png');"></div>
        <div class="right col-md-4 hidden-sm-down">
          <h2 class="featured-title"><a href="#">MORE EXCITING</a></h2>
          <p class="info-tag">Than your grandmothers book group.</p>
        </div>
      </div>
    </div>
  </div>
  
  <!--  Our handy dandy wine and brandy navigadoodles.  -->
  <div id="navLinks">
    <ul>
      <li class="itemLinks">1</li>
      <li class="itemLinks">2</li>
      <li class="itemLinks">3</li>
      <li class="itemLinks">4</li>
    </ul>
  </div>
  <!--  -->
</div>
              
            
!

CSS

              
                .slideways #wrapper {
  width: 400%;
  transform: translate3d(0, 0, 0);
  transition: transform .5s ease-in-out;
}
.slideways .content {
  float: left;
  width: 100vw;
  height: 100vh;
  white-space: normal;
  background-repeat: no-repeat;
  background-size:cover;
  font-family:sans-serif;
  display:flex;
}

.slideways body{
  margin:0;
}

.slideways .left{
  height:inherit;
  background-size:cover;
  float:left;
}
.slideways .right{
  height:inherit;
  background:#222;
  padding:15px;
  color:white;
}

.slideways #contentContainer {
  width: 100%;
  height: 100vh;
  border:none;
  overflow: hidden;
  text-align:left;
  margin:0 auto;
}

.slideways #navLinks {
  text-align: center;
  width: 100%;
  margin:0 auto;
  transform:translateY(-60px);
}
.slideways #navLinks ul {
  margin: 0px;
  padding: 0px;
  display: inline-block;
  margin-top: 6px;
}
.slideways #navLinks ul li {
  float: left;
  text-align: center;
  margin: 10px 5px;
  list-style: none;
  cursor: pointer;
  background-color: #CCCCCC;
  padding: 10px;
  font-family:sans-serif;
}
.slideways #navLinks ul li:hover {
    background-color: cornflowerblue;
  color:white;
}
.slideways #navLinks ul li.active {
    background-color: #333333;
    color: #FFFFFF;
    outline-width: 7px;
}
.slideways #navLinks ul li.active:hover {
    background-color: #484848;
    color: #FFFFFF;
}

.no-gutter{
  padding-right:0;
  padding-left:0;
}

.slideways .featured-title a{
  font-size:2rem;
  color:white;
}

.slideways p{
  font-size:1.5rem;
  text-transform:lowercase;
  font-variant:small-caps;
  text-align:justify;
  padding-right:15px;
}



              
            
!

JS

              
                  // just querying the DOM...like a boss!
var links = document.querySelectorAll(".itemLinks");
var wrapper = document.querySelector("#wrapper");
 
// the activeLink provides a pointer to the currently displayed item
var activeLink = 0;
 
// setup the event listeners
for (var i = 0; i < links.length; i++) {
    var link = links[i];
    link.addEventListener('click', setClickedItem, false);
 
    // identify the item for the activeLink
    link.itemID = i;
}
 
// set first item as active
links[activeLink].classList.add("active");
 
function setClickedItem(e) {
    removeActiveLinks();
 
    var clickedLink = e.target;
    activeLink = clickedLink.itemID;
 
    changePosition(clickedLink);
}
 
function removeActiveLinks() {
    for (var i = 0; i < links.length; i++) {
        links[i].classList.remove("active");
    }
}
 
// Handle changing the slider position as well as ensure
// the correct link is highlighted as being active
function changePosition(link) {

    var position = link.getAttribute("data-pos");
    var newPos = '-'+(100/links.length)*(link.itemID)+ '%';
 
    var translateValue = "translate3d(" + newPos + ", 0px, 0)";
    wrapper.style[transformProperty] = translateValue;
 
    link.classList.add("active");
}
 
//
// Dealing with Transforms
//
var transforms = ["transform",
            "msTransform",
            "webkitTransform",
            "mozTransform",
            "oTransform"];
 
var transformProperty = getSupportedPropertyName(transforms);
 
// vendor prefix management
function getSupportedPropertyName(properties) {
    for (var i = 0; i < properties.length; i++) {
        if (typeof document.body.style[properties[i]] != "undefined") {
            return properties[i];
        }
    }
    return null;
}
              
            
!
999px

Console