Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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 id="main">

  <!-- Navigation Bar =============================== -->

  <header class="show-for-large-up">
    <nav>
      <div class="row">
        <div class="large-12 columns">

          <!--REPLACE WITH PHP MENU SCRIPT-->
          <!-- <?wp_nav_menu(array('theme_location'=>'primary','container'=>'navigation'));?>-->
          <ul>
            <li class="current-menu-item"><a href="#">Special Item</a></li>
            <li class="menu-item-has-children"><a href="#">Special Item</a>
              <ul>
                <li><a href="#">Sub Item</a></li>
                <li><a href="#">Sub Item</a></li>
                <li><a href="#">Sub Item</a></li>
              </ul>

            <li><a href="#">Special Item</a></li>
            </li>
          <li class="menu-item-has-children"><a href="#">Menu Item</a>
            <ul>

              <li><a href="#">Sub Item</a></li>
              <li><a href="#">Sub Item</a></li>
            </ul>
          </li>
          <li><a href="#">Menu Item</a></li>
          <li><a href="#">Menu Item</a></li>
          </ul>
        <!--END REPLACE WITH PHP MENU SCRIPT-->

      </div>
      </div>
    </nav>
  </header>



<!-- Navigation Bar (Mobile) =============================== -->

<header class="show-for-medium-down">

  <a href="#" class="logo">
    <img src="http://mdcr.tv/wp-content/themes/mdcrtv/img/mdcrtv-logo.svg" alt="Site Name" />
  </a>
  
  <div class="toggle-nav">
    <span class="fa fa-bars"></span>
  </div>

  <div class="toggle-search">
    <span class="fa fa-search"></span>
  </div>

  <nav class="mobile-nav">

          <!--REPLACE WITH PHP MENU SCRIPT-->
          <!-- <?wp_nav_menu(array('theme_location'=>'primary','container'=>'navigation'));?>-->
          <ul>
            <li class="current-menu-item"><a href="#">Special Item</a></li>
            <li class="menu-item-has-children"><a href="#">Special Item</a>
              <ul>
                <li><a href="#">Sub Item</a></li>
                <li><a href="#">Sub Item</a></li>
                <li><a href="#">Sub Item</a></li>
              </ul>

            <li><a href="#">Special Item</a></li>
            </li>
          <li class="menu-item-has-children"><a href="#">Menu Item</a>
            <ul>

              <li><a href="#">Sub Item</a></li>
              <li><a href="#">Sub Item</a></li>
            </ul>
          </li>
          <li><a href="#">Menu Item</a></li>
          <li><a href="#">Menu Item</a></li>
          </ul>
        <!--END REPLACE WITH PHP MENU SCRIPT-->
    
  </nav>

<div class="mobile-search">
  <div class="row">
    <div class="medium-12 columns">
      <form class="btn-field" method="" action="">
        <input type="text" placeholder="Search Site" />
        <input class="btn-red icon" type="submit" value="Search" />
      </form>

    </div>
  </div>
</div>

</header>


<!--Insert Website Here-->


</div>
              
            
!

CSS

              
                html, body {
  margin: 0;
  background: #222a2f;
  font-family: sans-serif;
}

#main {
  margin: 0 auto;
}

/* Navigation (DESKTOP)
================================================== */
@media screen and (min-width:64em){
  header nav {
    background: #222222;
    width: 100%;
    float:left;
  }
  header nav ul {
    margin: 0;
    width: 100%;
    float:left;
  }
  header nav ul > li {
    list-style:none;
    float:left;
    position: relative;
  }
  header nav ul > li > a {
    font-size:0.875em;
    color: #ffffff;
    padding: 1em 1.5em;
    display: block;
    text-decoration: none;
    font-weight:bold;
    text-transform: uppercase;
    transition:all .2s ease-in-out;
    border-right: 1px solid #222222;
  }
  header nav ul > .menu-item-has-children > a:after {
    content: "\f107";
    font-family: 'FontAwesome';
    padding-left: .5em;
  }
  /*  Special Items*/
  header nav ul > li:nth-child(1) > a,
  header nav ul > li:nth-child(2) > a,
  header nav ul > li:nth-child(3) > a {
    background: #343434;
  }
  header nav ul > li:hover > a {
    color: #ffffff;
    background: #0077ff;
  }

  header nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 15em;
    background: #0077ff;
    z-index:999;
    display:none;
  }

  header nav ul > li:hover ul {
    display: block;
  }

  header nav ul ul li{
    width: 100%;
    background:none !important;
  }

  header nav ul ul li a {
    background:none !important;
    border:none !important;
    font-size: .75em;
    color: #ffffff;
    background: none;
    padding: 1em 1.5em;
    display: block;
    text-decoration: none;
    font-weight:bold;
    text-transform: uppercase;
    transition:all .2s ease-in-out;
  }
  header nav ul ul li a:hover {
    background: #222222 !important;
  }
  header .account {
    color: #86878B;
    float: right;
    padding: .75em 0;
  }
  header .account a {
    font-size: 0.875em;
    color: #86878B;
  }
}

/* Navigation (Mobile/Small Tablet)
================================================== */
@media only screen and (max-width:64em){
  header{
    width:100%;
    float:left;
    padding:0;
    background: #eee;
  }
  .toggle-background {background: #E7E7E7;}
  .toggle-rotate {transform: rotate(180deg);}
  .toggle-nav,.toggle-search{
    float:right;
    width:2em;
    height:2em;
    text-align:center;
    font-size:2em;
    line-height:2em; 
    color:#86878B;
    transition:all 0.25s ease;
    cursor: pointer;
  }
  .toggle-nav:hover,.toggle-search:hover{
    color:#0077ff;
  }
  .logo{
    float: left;
    padding: 1em;
    width: 10em;
  }
  .logo img{
    height:auto;
    width:100%;
  }
  .mobile-nav,.mobile-search{
    display:none;
    background:#FFFFFF;
    margin-top: 4em;
    width: 100%;
  }
  .mobile-search{padding: 2em 0 1em;}
  .mobile-search .search-form {
    margin: 1.5em 0 1em;
    padding: 0 2em;
    border-top:1px solid #E7E7E7;
  }
  .mobile-nav ul {
    margin: 0;
  }
  .mobile-nav li {
    list-style:none;
    position: relative;
  }
  .mobile-nav li a {
    padding:1em;
    color:#282828;
    text-decoration:none;
    font-weight:600;
    font-size:1em;
    border-top:1px solid #E7E7E7;
    display:block;
    text-transform:uppercase;
  }
  .mobile-nav .accordion-toggle {
    position: absolute;
    top: 0;
    z-index: 999;
    font-size: 1.8em;
    line-height: 2;
    right: 0;
    font-family: "FontAwesome";
    padding: 0 .5em;
    border-left: 1px solid #E7E7E7;
    transition:all 0.25s ease;
  }
  .mobile-nav .accordion-toggle .fa {
    transition:all 0.25s ease;
  }
  .mobile-nav li > ul {
    background: #E7E7E7;
    font-size: .8em;
    display:none;
  }
  .mobile-nav li > ul a {
    padding-left: 2em;
    color:#484848;
    border-bottom:1px solid #E2E2E2;
  }
  .mobile-nav li > ul li:last-child a { 
    border: none;
  }
  .mobile-nav li > ul ul {
    display:none;
  }
}

/* Input & Button Styles
================================================== */
.btn {
  display:inline-block;
  padding: 1em 2.5em;
  box-shadow: 0 2px 3px rgba(0,0,0,.15);
  border-radius: 0.313em;
  font-size:0.938em;
  cursor: pointer;
  margin-bottom: 1em;
  height: auto;
}
.btn:not(:last-of-type) {margin-right: 1em;}

.btn-red {
  text-decoration:none;
  text-transform: uppercase;
  font-weight:bold;
  background: #0077ff;
  color: #ffffff;
  border: 1px solid #0077ff;
}
.btn-red:hover {
  background: #0077ff;
  color: #ffffff;
}
.btn-red:active {
  background: #b00000;
  color: #ffffff;}

.btn-white {
  text-decoration:none;
  text-transform: uppercase;
  font-weight:bold;
  background: #ffffff;
  color: #666666 !important;
  border: 1px solid #ffffff;

}
.btn-white:hover {
  color: #333333 !important;
  background: #ffffff;
}
.btn-white:active {
  background: #cccccc;
}

.btn-field {position:relative;margin-bottom: 1em;float:left;width:100%;}
.btn-field input[type=text] {
  width:100%;
  padding: 1em 6em 1em 1em;
  margin: 0;
  font-size:0.938em;
  float:left;
  border:none;
  box-shadow: 0 2px 3px rgba(0,0,0,.15);
  border: 1px solid #cccccc;
  border-radius: 0.313em .5em .5em .313em;
  height: auto;
}
.btn-field input[type=submit] {
  cursor: pointer;
  position: absolute;
  top:0;
  right: 0;
  padding: 1em;
  /*font-size:0.938em;*/
  text-transform: uppercase;
  font-weight:bold;
  background: #0077ff;
  color: #ffffff;
  border: 1px solid #0077ff;
  padding: 1em 1.25em;
  border-radius: 0 0.313em 0.313em 0;
  height: 100%;
}
.btn-field .icon {
  font-family: 'FontAwesome';
}
.btn-field input[type=submit]:hover {
  background: #0077ff;
}
.btn-field input[type=submit]:active {
  background: #b00000;
}
              
            
!

JS

              
                		//Toggle mobile menu & search
		$('.toggle-nav').click(function() {
		  console.log('toggle nav');
		  $('.mobile-nav').slideToggle(200);
		  $('.mobile-search').slideUp(200);
		});
		//Close navigation on anchor tap
			$('a').click(function() {
		  console.log('close nav');
		  $('.mobile-nav').slideUp(200);
		  $('.mobile-search').slideUp(200);
		});	

		$('.toggle-search').click(function() {
		  console.log('toggle search');
		  $('.mobile-search').slideToggle(200);
		  $('.mobile-nav').slideUp(200);
		});

		//Mobile menu accordion toggle for sub pages
		$('.mobile-nav > ul > li.menu-item-has-children').append('<div class="accordion-toggle"><div class="fa fa-angle-down"></div></div>');
		$('.mobile-nav .accordion-toggle').click(function() {
		  $(this).parent().find('> ul').slideToggle(200);
		  $(this).toggleClass('toggle-background');
		  $(this).find('.fa').toggleClass('toggle-rotate');
		});
              
            
!
999px

Console