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

              
                <nav class="navbar navbar-default">
  <div class="container">
    <div class="navbar-header">
      <a class="navbar-brand" href="#top">Kyle M. Perkins</a>
    </div>

    <ul class="nav navbar-nav pull-right">
      <li class="active"><a href="#top">About</a></li>
      <li><a href="#books">Books</a></li>
      <li><a href="#videos">Videos</a></li>
      <li><a href="#portfolio">Portfolio</a></li>
      <li><a href="#contact">Contact</a></li>
    </ul>
  </div>
</nav>
<main>
  <div class="container">
    <section id="top">
      <div class="col-xs-8 pull-right">
        <h1 class="text-center">Author &middot; Developer &middot; Educator</h1>
        <p>Talented developer with over 15 years of experience with full-stack development, focusing on providing real-world usability for to modern websites and applications.</p>
      </div>
    </section>

    <section id="books">
      <h2>Books</h2>
      <div class="row row-flex row-flex-wrap">
        <div class="col-xs-2">
          <a href="#1" target="_blank" class=" text-center thumbnail">
          <img src="https://cdn.lunar-productions.com/img/covers/lmf_1_cover.png" alt="Light My Fire"/>
            <div class="caption">Light My Fire: Ascension</div>
            </a>
        </div>
        <div class="col-xs-2">
          <a href="#2" target="_blank" class=" text-center thumbnail">
          <img src="https://cdn.lunar-productions.com/img/covers/nb_4_cover.png" alt="Light My Fire"/>
          <div class="caption">Night Blade: Dark of the Night</div>
        </a>
        </div>
        <div class="col-xs-2">
          <a href="#3" target="_blank" class=" text-center thumbnail">
          <img src="https://cdn.lunar-productions.com/img/covers/nb_3_cover.png" alt="Light My Fire"/>
          <div class="caption">Night Blade: Dusk of Demise</div>
          </a>
        </div>
        <div class="col-xs-2 ">
          <a href="#4" target="_blank" class=" text-center thumbnail">
          <img src="https://cdn.lunar-productions.com/img/covers/nb_2_cover.png" alt="Light My Fire"/>
          <div class="caption">Night Blade: Day of Reckoning</div>
          </a>
        </div>
        <div class="col-xs-2">
          <a href="#5" target="_blank" class=" text-center thumbnail">
          <img src="https://cdn.lunar-productions.com/img/covers/nb_1_cover.png" alt="Light My Fire"/>
          <div class="caption">Night Blade: Dawn of Discovery</div>
           </a>
        </div>

    </section>

    <section id="videos">
      <h2>Videos</h2>
      <div class="row">
        <div class="col-xs-6 text-center">
          <h3>HTML/CSS</h3>
          <div class="iframe">
            <iframe src="https://www.youtube.com/embed/2FfCsBdbMI0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe></div>
        </div>
        <div class="col-xs-6 text-center">
          <h3>Japan</h3>
          <div class="iframe">
            <iframe src="https://www.youtube.com/embed/mf2KwMtCvK0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
          </div>
        </div>
      </div>
    </section>

    <section id="portfolio">
      
        <h2>Portfolio</h2>
        <div class="col-xs-6 text-center">
          <div id="alp" class="thumbnail"></div>
          <div id="flbc" class="thumbnail"></div>
          <div id="lmp" class="thumbnail"></div>
        </div>
        <div class="col-xs-6 text-center">
          <div id="ss" class="thumbnail"></div>
          <div id="plp" class="thumbnail"></div>
          <div id="lsf" class="thumbnail"></div>
        </div>

    </section>

    <section id="contact">
      <h2>Contact Me</h2>
      <div class="col-xs-8">
        <form id="contactForm">
          <input type="text" name="name" id="name" placeholder="Your Name" />
          <input type="email" name="email" id="email" placeholder="You@Email.com" />
          <textarea name="comments" id="comments" placeholder="What can I help with?"></textarea>
          <button type="submit" class="col-xs-offset-1 col-xs-8 btn-blue"><i class="fa fa-paper-plane"></i> Send</button>

        </form>
      </div>
      <div class="col-xs-4 text-center">
        <img src="https://cdn.kmp.link/img/concarolinas_2015.png" alt="KMP" class="img-circle" />
      </div>
    </section>
    </div>
</main>
<footer>
  <div class="container text-center">
    <div class="col-xs-6 text-center">
      <h3>About this Page</h3>
      <p>Made with <i class="fa fa-coffee"></i> and <i class="fa fa-code"></i><br/>
        by <a href='//kmp.link' target="_blank">Kyle M. Perkins</a>
    </div>
    <div class="col-xs-6 text-center">
      <h3>Socialz</h3>
      <ul>
        <li><a href='//twitter.com' target="_blank"><i class='fa fa-twitter'></i></a></li>
        <li><a href="//facebook.com" target="_blank"><i class='fa fa-facebook'></i></a></li>
        <li><a href='//github.com/kode29' target="_blank"><i class="fa fa-github"></i></a></li>
        <li><a href="//amazon.com/author/kylemperkins" target="_blank"><i class="fa fa-amazon"></i></a></li>
        <li><a href="https://linkedin.com/in/kylemperkins" target="_blank"><i class="fa fa-linkedin"></i></a></li>
        <li><a href="//freecodecamp.org/kode29" target="_blank"><i class="fa fa-free-code-camp"></i></a></li>
      </ul>
    </div>
  </div>
</footer>
              
            
!

CSS

              
                body {
  background-color: #aaa;
}

/* Navigation */

.navbar {
  background-color: rgb(255, 140, 0);
  border: 0;
  border-radius: 0;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75);
  height: 65px;
  position: fixed;
  width: 100%;
  z-index: 1000; /* to make sure it comes out on top */
}
.navbar-nav > li > a {
  line-height: 35px;
  display: block;
  width: 125px;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.075em;
}
.navbar-default .navbar-brand {
  font-family: "Rock Salt", cursive;
  font-size: 230%;
  color: #fff;
  line-height: 35px;
  height: 65px;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
}
.navbar-default .navbar-brand:hover {
  color: #333;
  text-shadow: 2px 2px 2px rgba(255,255,255,.7);
}
.navbar-default .navbar-nav > li > a {
  color: #fff;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
  background-color: rgb(255, 165, 0);
  color: #fff;
}
.navbar {
  margin-bottom: 0px;
}

/* Main content - General */
.row-flex,
.row-flex > div[class*="col-"] {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  /*flex:1 1 auto;*/
  justify-content: space-around;
}
.row-flex-wrap {
  -webkit-flex-flow: row wrap;
  align-content: flex-start;
  flex: 0;
}

.row-flex > div[class*="col-"],
.container-flex > div[class*="col-"] {
  margin: -0.2px; /* hack adjust for wrapping */
}
main {
  padding-top: 65px;
}
main .container {
  background-color: #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.75);
  padding: 0;
}
main .container section {
  padding: 15px;
  overflow: auto;
}
section{
  padding-top: 15px;
  padding-bottom: 15px;
}
section h2 {
  font-family: "Black Ops One", cursive;
  transform: rotate(-5deg);
  position: relative;
  top: -55px;
}

/* Main Content - specific */
#top {
  padding-top: 30px;
  background: url("https://cdn.kmp.link/img/kp_background.png") 0% 10% no-repeat #000;
  color: #fff;
  min-height: 350px;
}
#top h1 {
  font-family: "Black Ops One", cursive;
  margin: 50px auto;
  font-size: 2.5em;
}
#top p {
  font-size: 1.5em;
}
#books .thumbnail {
  transition: all 0.25s ease-in-out;
}
#books .thumbnail:hover {
  transform: scale(1.05);
}
#contact img {
  max-width: 300px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
/* Thanks to http://flwebsites.biz/posts/proportional-responsive-iframes-youtube-videos */
#videos .iframe {
  position: relative;
  width: 100%;
  height: 0px;
  padding-bottom: 60%;
}
#videos iframe {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
}
#portfolio .thumbnail {
  width: 80%;
  height: 300px;
  margin: auto;
  margin-bottom: 25px;
      box-shadow: 0 0 8px rgba(0,0,0,.8);
}
#portfolio #alp {
  background: url("https://kylemperkins.com/clientphotos/alp.png");
  background-size: cover;
}
#portfolio #flbc {
  background: url("https://kylemperkins.com/clientphotos/flbc.png");
  background-size: cover;
}
#portfolio #lmp {
  background: url("https://kylemperkins.com/clientphotos/lmp.png");
  background-size: cover;
}
#portfolio #ss {
  background: url("https://kylemperkins.com/clientphotos/ss.png");
  background-size: cover;
}
#portfolio #plp {
  background: url("https://kylemperkins.com/clientphotos/wcuplp.png");
  background-size: cover;
}
#portfolio #lsf {
  background: url("https://kylemperkins.com/clientphotos/lsf.png");
  background-size: cover;
}

/* Contact Section */
#contactForm input,
#contactForm textarea {
  width: 80%;
  font-size: 150%;
  margin-bottom: 30px;
  border: 0;
  border-bottom: 1px #000 solid;
  padding: 15px;
  display: block;
}
#contactForm input:focus,
#contactForm textarea:focus{
  background-color: rgba(255,210,0,.1);
  box-shadow: 0 0 5px rgb(68, 138, 255);
}
#contactForm textarea {
  height: 150px;
}
#contactForm button{
  font-size: 130%;
  border-radius: 5px;
}
#contact{
  padding-bottom: 15px;
}


/* Footer */
footer {
  padding-top: 15px;
  padding-bottom: 45px;
  background-color: rgb(255, 140, 0);
  
    box-shadow: 0 0 8px rgba(0,0,0,.7);
}
footer h3{
  text-transform: uppercase;
}

footer ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
footer ul li{
  display: inline-block;
  height: 50px;
  width: 50px;
  margin: 5px;
}
footer ul li a{
  display: block;
  height: 100%;
  width: 100%;
  border: 2px #000 solid;
  background-color: #000;
  color: #fff;
  border-radius: 100%;
  line-height: 47px; /* To make it more vertically center */
  font-size: 150%;
}
footer ul li a:hover{
  background-color: #fff;
  color: #000;
}
footer ul li:nth-of-type(odd){
  position: relative;
  top: -10px;
}
.btn-blue {
  background-color: rgb(68, 138, 255);
  color: #fff;
  border: 0;
  padding: 5px 15px;
}
.btn-blue:hover{
  background-color: #01579B;
}

              
            
!

JS

              
                /* Thanks to http://jsfiddle.net/joshnh/YxRqp/ */
var main = main = $('#main ul');

$('nav ul li a').click(function(event) {
        
    event.preventDefault();
 
    var full_url = this.href,
        parts = full_url.split('#'),
        trgt = parts[1],
        target_offset = $('#'+trgt).offset(),
        target_top = target_offset.top;
        
    $('html, body').animate({scrollTop:target_top}, 500);
    
    /* Remove active class on any li when an anchor is clicked */
    
    main.children().removeClass();
    
    /* Add active class to clicked anchor's parent li */
        $('nav ul li').removeClass('active');
    $(this).parent().addClass('active');

});

              
            
!
999px

Console