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


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


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.


                <header class="header">
  <div class="header-wrap u-flex u-flexCenter u-container">
    <!-- Logo -->
    <div class="header-left u-flex0">
      <a href="/" class="logo">GodoFredo</a>
    <!-- menu -->
    <nav class="header-center menu u-flex1">
      <ul class="u-flex u-flexCenter u-hide-before-md">
        <li><a href="#">menu</a></li>
        <li><a href="#">menu1</a></li>
        <li><a href="#">menu2</a></li>
        <li><a href="#">menu3</a></li>
        <li><a href="#">menu4</a></li>
    <div class="header-right u-flex u-flexCenter u-flex0">
    <!-- Social Media -->
      <div class="follow u-hide-before-md">
        <a href="#"><i class="fa fa-facebook-official" aria-hidden="true"></i></a>
        <a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
        <a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
        <a href="#"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
      <!-- Menu Open Close -->
      <a href="#" class="button-nav--toggle u-hide-after-md">
  <!-- Sidenav  -->
  <div class="sidenav">
    <div class="sidenav-wrap">
        <li><a href="#">Menu</a></li>
        <li><a href="#">Menu1</a></li>
        <li><a href="#">Menu2</a></li>
        <li><a href="#">Menu3</a></li>
        <li><a href="#">Menu4</a></li>

<!-- main  -->
<main class="main">
  <a href="" target="_blank" class="demo">Demo</a>


// Variables
$header-color: #bbf1b9;

// Global
html { height: 100%}
a {
    color: inherit;
    text-decoration: none;

body {
  font-family: 'Source Sans Pro', sans-serif;
  height: 100%;

ul {
  list-style: none;
  list-style-image: none;
  margin: 0;
  padding: 0;

// Utilities
.u-flex { display: flex }
.u-flexCenter { align-items: center }
.u-flex1 { flex: 1 1 auto }
.u-flex0 { flex: 0 0 auto }
.u-container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;

// Header
.header {
  background-color: #00a034;
  a { color: $header-color; }
  &-wrap { 
    max-width: 1200px ;
    position: relative;
    height: 50px;
    z-index: 100;

// Logo
.logo {
  font-size: 24px;
  font-weight: 600;
  color: #fff !important;
  margin-right: 20px;

// Menu
.menu {
  overflow: hidden;
  a {
    margin-right: 22px;
    text-transform: uppercase;

/* Toggle BTN for Menu */
.button-nav--toggle {
  height: 48px;
  position: relative;
  transition: transform .4s;
  width: 48px;
  span {
    background-color: $header-color;
    display: block;
    height: 2px;
    left: 14px;
    margin-top: -1px;
    position: absolute;
    top: 50%;
    transition: .4s;
    width: 20px;
    &:first-child { transform: translateY(-6px) }
    &:last-child { transform: translateY(6px) }

// Sidenav
.sidenav {
  color: rgba(0,0,0,.8);
  height: 100vh;
  padding: 50px 20px;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  transition: .4s;
  will-change: transform;
  z-index: 99;
  &-wrap {
    background: #eee;
    overflow: auto;
    padding: 20px 0;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
  ul a {
    padding: 10px 20px;
    display: block;
    color: #222;

// follow
.follow a {
  font-size: 20px;
  margin-right: 8px;

// main
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  transition: transform .5s ease;

.demo {
  background: #00a034;
  color: #fff;
  padding:10px 20px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: 2px;

// Media Query
@media only screen and (max-width: 766px) {
  // show sidenav { 
    overflow: hidden;
    .sidenav { transform: translateX(0) }
    .main { transform: translateX(-25%) }
     /* Active BTN Sidenav */
    .button-nav--toggle span {
      &:first-child { transform: rotate(45deg) translate(0) }
      &:nth-child(2) { transform: scaleX(0) }
      &:last-child { transform: rotate(-45deg) translate(0) }
 // hide
  .u-hide-before-md { display: none !important }

@media only screen and (min-width: 766px) {
  .u-hide-after-md { display: none !important }


                $(document).ready(function() {
  /* CLick BTN (Open and Close) */
	$('.button-nav--toggle').on('click', function(e) {