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

              
                <header>
  <nav class='navbar fixed-top justify-content-end'>
    <ul class='nav'>
      <li><a href='#top'>About</a></li>
      <li><a href='#portfolio'>Portfolio</a></li>
      <li><a href='#contact'>Contact</a></li>
    </ul>
  </nav>
</header>

<!-- To make About link go to very top of page -->
<div id='top'></div>

<main>
  <div class='main mx-auto text-center'>
    <section id='about'>
      <img class='rounded-circle' src='https://vignette1.wikia.nocookie.net/cutemariobro/images/5/59/Person-placeholder.jpg/revision/latest?cb=20170131092134'>
      <div class='about-text'>
        <p>Status: Looking for web/software development opportunities</p>
        <hr />
        <p>Jack of all trades. Always learning. </p>
      </div>
    </section>

    <section id='portfolio'>
      <h1>Portfolio</h1>
      <div class='row justify-content-center'>
        <div id='portfolio-carousel' class='carousel slide'>
          <div class='carousel-inner'>
            <div class='active'>
              <img alt='placeholder image 3' src='https://getuikit.com/v2/docs/images/placeholder_600x400.svg'>
            </div>
            <div>
              <img alt='placeholder image 3' src='https://getuikit.com/v2/docs/images/placeholder_600x400.svg'>
            </div>
            <div>
              <img alt='placeholder image 3' src='https://getuikit.com/v2/docs/images/placeholder_600x400.svg'>
            </div>
          </div>
          <a href='#portfolio-carousel' class='carousel-control-prev' role='button' data-slide='prev'>
            <span class='carousel-control-prev-icon'></span
          </a>
          <a href='#portfolio-carousel' class='carousel-control-next' role='button' data-slide='next'>
            <span class='carousel-control-next-icon'></span>
          </a>
        </div>
      </div>
    </section>

    <section id='contact'>
      <h1>Contact</h1>

      <form id='contact-form' class='form-group text-left' novalidate>
        <input type='email' id='form-email' placeholder='Email address' required>
        <div class='invalid-feedback'>Please provide an email address</div>
        <input type='text' id='form-subject' placeholder='Subject'>
        <textarea id='form-message' placeholder='Message' required></textarea>
        <div class='invalid-feedback'>Please provide a message</div>
        <button type='submit' class='btn btn-primary mb-3'>Submit</button>
      </form>
    </section>
  </div>
</main>

<footer>
  <ul class='nav justify-content-center'>
    <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
    <li><a href="#"><i class="fa fa-github"></i></a></li>
    <li><a href="#"><i class="fa fa-codepen"></i></a></li>
    <li><a href="#"><i class="fa fa-twitter"></i></a></li>
    <li><a href="#"><i class="fa fa-instagram"></i></a></li>
  </ul>
</footer>
              
            
!

CSS

              
                body {
  position: relative;
  background: slategrey;
}

/* CSS for header */
.navbar {
  background: #116;
  box-shadow: 1px 1px 3px;
}

.nav-link {
  border-radius: 0;
  color: lightgrey;
}

.nav-link:hover {
  color: lightsteelblue;
  box-shadow: 1px 1px 1px lightsteelblue;
}

.active {
  color: black;
  background: lightsteelblue;
  box-shadow: 2px 2px 4px;
}

.active:hover {
  background: steelblue;
}

/* CSS for main */
#top {
  height: 1px;
  display: block;
}

main section {
  margin: 0px auto;
  width: 80%;
  padding: 100px;
  box-shadow: 0 0 5px #555;
}

#about {
  margin-top: 50px;
  background: lightgrey;
}

.about-text {
  margin-top: 25px;
  font-size: 20px;
}

#portfolio {
  background: lightsteelblue;
}

#portfolio h1 {
  padding-bottom: 25px;
}

#contact {
  background: lavender;
}

.form-control {
  border-radius: 0;
  background: inherit;
  border-style: none none solid none;
}

.form-control:focus {
  background: inherit;
}

/* CSS for footer */
footer {
  background: lightgrey;
  height: 100px;
  box-shadow: 1px 1px 5px 1px;
}

.social {
  margin: 30px auto;
  color: black;
}

.social:hover {
  background: #116;
  border-radius: 25%;
  color: lightgrey;
  box-shadow: 1px 1px 1px 1px lightgrey;
}
              
            
!

JS

              
                'use strict';

$(document).ready(function() {
  // So I don't have to write repeat code
  $("img").addClass("img-fluid");
  $(".nav li").addClass("nav-item");
  $(".nav li a").addClass("nav-link");
  $(".carousel-inner div").addClass("carousel-item");
  $('form div').addClass('row');
  $('input, textarea').addClass('form-control mb-3');
  $('footer .nav li a').addClass('social');

  // Prepare the body for Scrollspy
  $("body").scrollspy({ target: ".nav" });

  // Slide the carousel
  $("#portfolio-carousel").carousel({ interval: false });
});

(function() {
  window.addEventListener("load", function() {
    var form = document.getElementById("contact-form");
    form.addEventListener("submit", function(event) {
      if (form.checkValidity() == false) {
        event.preventDefault();
        event.stopPropagation();
      }
      form.classList.add("was-validated");
    }, false);
  }, false);
}());
              
            
!
999px

Console