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

              
                <div class="menu">
  <a href="#" class="name">Menu
    <i class="fa fa-toggle-off" id="toggle"></i>
  </a>
  <ul class="hidden">
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
    <li><a href="#portfolio">Portfolio</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</div>
<header id="home">
  <div class="header-content">
    <h1>SEO<span>4</span>Opt<span>1</span>m</h1>
    <h3>SEO &amp; Content Marketing Services</h3>
  </div>
</header>
<section id="about">
  <div class="row">
    <article>
      <h2>About Us</h2>
      <p>Search engine optimization (SEO) is the process of affecting the online visibility of a website or a web page in a web search engine's unpaid results—often referred to as "natural", "organic", or "earned" results. In general, the earlier (or higher ranked on the search results page), and more frequently a website appears in the search results list, the more visitors it will receive from the search engine's users; these visitors can then be converted into customers.</p>
      <p>SEO may target different kinds of search, including image search, video search, academic search, news search, and industry-specific vertical search engines. SEO differs from local search engine optimization in that the latter is focused on optimizing a business' online presence so that its web pages will be displayed by search engines when a user enters a local search for its products or services. The former instead is more focused on national or international searches.</p>
    </article>
  </div>
</section>

<!-- Portfolio Section -->
<section id="portfolio">
  <div class="row">
    <article>
      <h2>Our Portfolio</h2>
      <p>To view the projects from our prtfolio click on each title panel to reveal the content.</p>
      <div class="panel">
        <div class="panel-head">
          <h3>Project One</h3>
          <i class="fa fa-plus-circle"></i>
        </div>
        <article class="panel-body">
          <h4>Project One Description.</h4>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. </p>
        </article>
      </div><!-- /.panel -->
      <div class="panel">
        <div class="panel-head">
          <h3>Project Two</h3>
          <i class="fa fa-plus-circle"></i>
        </div>
        <article class="panel-body">
          <h4>Project Two Description.</h4>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. </p>
        </article>
      </div><!-- /.panel -->
      <div class="panel">
        <div class="panel-head">
          <h3>Project Three</h3>
          <i class="fa fa-plus-circle"></i>
        </div>
        <article class="panel-body">
          <h4>Project Three Description.</h4>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. </p>
        </article>
      </div><!-- /.panel -->
    </article>
  </div>
</section>
<!-- Contact Section -->
<section id="contact">
  <div class="row">
    <article>
    <h2>If You Wish To Contact Us</h2>
    <form>
      <fieldset>
        <legend>Use This Contact Form:</legend>
        <label for="name">Your Name:</label>
        <input type="text" name="name" placeholder="&#9998; ...">
        <label for="email">Your Email:</label>
        <input type="email" name="email" placeholder="&#9998; ...">
        <label for="text">Your Message:</label>
        <textarea name="text" id="text" cols="30" rows="5" placeholder="&#9998; ..."></textarea>
        <input type="submit" value="Send" name="submit" id="submit">
      </fieldset>
    </form>
    </article>
  </div>
</section>
<!-- FOOTER -->
<footer>
  <p>&copy;2017. All Right Reserved.</p>
</footer>
              
            
!

CSS

              
                // --- VARIABLES ---
$bgprimary: cadetblue
$bgdark: #111111
$colorprimary: cadetblue
$colorlight: snow
// --- BASE STYLES ---
*
  padding: 0
  margin: 0
  box-sizing: border-box
body
  font-family: 'Playfair Display', serif
  background-color: $bgdark
  padding-top: 4rem
// --- GLOBAL STYLES ---
section
  padding: 2.7rem 0 0.5rem 0
article
  width: 100%
  padding: 1rem
.row
  max-width: 35rem
  margin: 0 auto 0 auto
// --- TYPOGRAPHY ---
h2
  color: $colorprimary
  font-size: 1.4rem
  margin-bottom: 1.5rem
  text-transform: uppercase
a
  display: inline-block
  padding: 0 1rem
  text-decoration: none
  color: white
  font-weight: 900
// --- NAVIGATION ---
i#toggle
  display: inline-block
  font-size: 1.7rem
.menu
  position: fixed
  top: 0
  left: 0
  width: 100%
  background-color: $bgprimary
  height: 4rem
  line-height: 4rem
  font-size: 1.3rem
  font-weight: 700
  z-index: 50
  ul
    color: $colorprimary
    list-style-type: none
    transition: all 0.5s ease
    background-color: rgba(21, 21, 21, 0.85)
    li
      height: 2.7rem
      line-height: 2.7rem
      border-bottom: 1px solid $colorprimary
      a
        display: block
        padding-left: 3rem
        color: $colorprimary
        font-size: 1.2rem
        transition: all 0.5s ease
      a:hover
        padding-left: 4.2rem
.hidden
  display: none
// --- HEADER ---
header
  background-color: #212121
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url(https://www.sketchuptextureclub.com/public/texture_m/0024-wood-wall-panels-texture-seamless.jpg)
  background-position: center
  background-attachment: fixed
  width: 100%
  padding: 7rem 0 9rem 0
  position: relative
  @media (min-width: 800px)
    padding: 9rem 0 11rem 0
  @media (min-width: 1025px)
    padding: 11rem 0 14rem 0
  .header-content
    width: 100%
    position: absolute
    left: 50%
    top: 50%
    transform: translate(-50%, -50%)
    -webkit-transform: translate(-50%, -50%)
    text-align: center
    h1
      font-size: 2.5rem
      text-transform: uppercase
      color: snow
      span
        color: brown
        font-size: 3.1rem
    h3
      font-size: 1.1rem
      text-transform: uppercase
      color: $colorlight
section p
  color: white
  font-size: 1.05rem
  margin-bottom: 1rem
  font-family: 'Signika', sans-serif
  line-height: 135%
  font-weight: 300
// --- ABOUT SECTION ---
#about article:after
  content: ""
  display: block
  text-align: center
  font-size: 1rem
  color: $colorprimary
// --- PORTFOLIO SECTION ---
.panel
  margin-bottom: 0.5rem
.panel-head
  padding: 0.5rem
  margin-bottom: 0.5rem
  border: 1px solid $colorlight
  position: relative
  h3
    color: $colorprimary
  i.fa
    display: inline-block
    position: absolute
    right: 1rem
    top: 30%
    color: $colorlight
.panel article
  display: none
  h4
    color: $colorprimary
    margin-bottom: 0.5rem
.hide
  display: none
// --- CONTACT SECTION ---
#contact 
  padding-bottom: 3rem
form
  box-sizing: border-box
  font-family: 'Signika', sans-serif
fieldset
  padding: 1rem
  border: 1px solid $colorlight
legend
  color: $colorlight
  padding: 0 10px
#contact label
  color: cadetblue
#contact input,
#contact label 
  display: block
  width: 100%
  padding: 5px
  margin: 0
  font-size: 1rem
#contact input
  color: #212121
  background-color: gainsboro
textarea
  background-color: gainsboro
  width: 100%
  padding: 5px
  font-size: 1rem
input::placeholder
  color: teal
  font-size: 1rem
textarea::placeholder
  font-size: 1rem
  color: teal
textarea::-ms-input-placeholder
  font-size: 1.2rem
  color: teal
input#submit
  margin-top: 1rem
  padding: 0.7rem 0
  background-color: $bgprimary
  color: white
  font-family: 'Playfair Display', serif
  font-size: 1.1rem
  font-weight: 900
  border: none
  transition: all 0.25s ease
input#submit:hover
  background-color: darken( $bgprimary, 10% )
// --- FOOTER --- 
footer
  background-color: #050505
  padding: 2rem 0
  color: snow
  text-align: center
footer p
  font-size: 0.9rem
              
            
!

JS

              
                // Top Navigation
$('.menu').click(function() {
  $('#toggle').toggleClass('fa-toggle-off');
  $('#toggle').toggleClass('fa-toggle-on');
  //$('.menu ul').toggleClass('hidden');
  $('.menu ul').slideToggle('200'); 
});

// Portfolio Panels
$('.panel-head').click(function() {
  $(this).next().slideToggle();
  if($(this).children('i').hasClass('fa-plus-circle')) {
    $(this).find('i').removeClass('fa-plus-circle').addClass('fa-minus-circle');
  } else {
    $(this).find('i').removeClass('fa-minus-circle').addClass('fa-plus-circle');
  }
});
              
            
!
999px

Console