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.

            
              <div class="container">

  <div id="logo">
    <h1><a href="#">Labics</a></h1>
  </div>

  <nav id="topnavi">
    <ul class="clearfix">
      <li class="active"><a href="#">Projects</a></li>
      <li><a href="#">Archive</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>

  <div id="project-name">
    <h2>Canyon House</h2>
  </div>

  <a href="#" id="prev-img">Previous Image</a>
  <a href="#" id="next-img">Next Image</a>

</div>
            
          
!
            
              h1,
h2 {
  font-size: 20px; 
  font-weight: 500;
}

.container a,
.container a:visited {
  color: #000;
  text-decoration: none;
}

.container a:focus,
.container a:hover,
.container a:active {
  color: #000; 
  border-bottom: 1px solid #000;
}

#logo {
  position: fixed; 
  top: 15px; 
  left: 25px; 
  text-transform: uppercase; 
  z-index: 15000;
}

#logo a:hover {
  color: #999; 
  border-bottom: 0;
}

#topnavi {
  position: fixed; 
  top: 15px; 
  left: 50%; 
  margin-left: -170px; 
  width: 340px; 
  font-size: 20px; 
  text-align: center;
  z-index: 15000;
}

#topnavi ul {
  list-style: none;
}

#topnavi ul li {
  display: inline-block; 
  font-size: 20px; 
  font-weight: 500;
}

#topnavi ul li a {
  margin: 0 5px 0;
}

#topnavi ul li.active a {
  color: #000; 
  border-bottom: 1px solid;
}

#project-name {
  position: fixed; 
  top: 40px; 
  left: 25px; 
  z-index: 15000;
}

#prev-img,
#next-img {
  position: fixed; 
  bottom: 15px; 
  left: 25px; 
  font-size: 16px; 
  font-weight: 500; 
  text-transform: uppercase; 
  z-index: 15000; 
  border-bottom: 1px solid transparent;
}

#next-img {
  left: auto; 
  right: 25px;
}

#prev-img:hover,
#next-img:hover {
  border-color: #000;
}

/***************************/ 
/* plugin overwrite styles */
/***************************/
/* remove the close cursor from the lightbox wrapper */
.sl-lightbox-wrapper {
  cursor: none;
}

/* also remove the close cursor for retina displays */
@media (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .sl-lightbox-wrapper {
    cursor: none;
  }
}


.sl-lightbox-cursor.left {
  left: -50%;
  width: 100%;
}

.sl-lightbox-cursor.right {
  right: -50%;
  width: 100%;
}

/* reposition and style
the index counter */
.sl-lightbox-caption-container .right {
  position: fixed;
  top: 16px;
  right: 25px;
  height: auto !important;
  font-size: 20px;
  font-weight: 500;
}

/* reposition and style the
lightbox caption */
.sl-lightbox-caption-container .center {
  position: fixed;
  bottom: 15px;
  left: 0;
  width: 100%;
  height: auto !important;
  font-size: 16px;
  font-weight: 500;
}

/* hard transition, also have to change
fadeLightboxItem setting option
accordingly */
.csstransitions .sl-lightbox-decks-container {
  -webkit-transition: all 0 ease;
  -moz-transition: all 0 ease;
  -ms-transition: all 0 ease;
  -o-transition: all 0 ease;
  transition: all 0 ease;
}
            
          
!
            
              $(function() {

  // initialize ScalableLightbox
  $.ScalableLightbox({
    // show what's happening in
    // the debugger console
    debug:        true,

    // define the path for all
    // resources (images):
    baseImgPath: 'https://www.scalable-lightbox.com/assets/img/lightbox/',

    // define data structure via API
    api:          'https://www.scalable-lightbox.com/assets/api/data.json',

    // disable index module
    index: {
      enabled:    false
    },

    // lightbox module
    lightbox: {
      // disable overlay
      overlay:                        false,
      padding: {
        vertical:                     220,
        horizontal:                   106,

        verticalMobile:               180,
        horizontalMobile:             50
      },
      img: {
        captionLeft:                  "none",
        captionCenter:                "caption",
        captionRight:                 "number",
        captionNumberFmt:             "%n%/%total%",

        captionVerticalMargin:        7
      },
      // the lightbox cannot be closed, otherwise
      // users would see a white page
      controls: {
        close:                        false
      }
    },
    callbacks: {
      // once a plugin module has been loaded,
      // display the current project in the lightbox
      loaded: function() {

        var regex = /#lightbox\/(\d*)\/(\d*)/,
            match = regex.exec(window.location.hash);

        // hash detect (if true, the plugin
        // will open the contents for you)
        if (!match) {
          $.ScalableLightbox("open", { module: "lightbox", deck: window.projectID });
        }
      }
    },
    // hard transition, also have to change
    // CSS accordingly
    transitions: {
      fadeLightboxItem:               0
    }
  });

  // prev link behavior
  $("#prev-img").click(function(e) {
    e.preventDefault();

    $.ScalableLightbox("prev");
  });

  // next link behavior
  $("#next-img").click(function(e) {
    e.preventDefault();

    $.ScalableLightbox("next");
  });

});
            
          
!
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