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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              	 <header>     
	  <section>
	      
	   <div class="desktop-nav-container">
	  
	    <div class="desktop-nav-item">
	     <a href="index.html">
	      <div id="logo">
		   <div id="name">DREW GOFF</div> 
		   <div id="title">UX<span class="highlight">/</span>UI Developer</div>
	      </div><!--logo-->
	     </a>
	    </div><!--desktop-nav-item-->
	  
	    <div class="desktop-nav-item">
	     <div class="desktop-nav">
		  <ul> 
		   <li><a class="top-nav active-link" href="#">Portfolio</a></li>
		   <li><a class="top-nav" href="#">About</a></li>
		   <li><a class="top-nav" href="#">Lab</a></li>	
		   <li><a class="top-nav" href="#">Music</a></li>	
		   <li><a class="top-nav" href="#">Resume</a></li>
		   <li><a class="top-nav" href="#">Contact</a></li>
		  </ul>
	     </div>
	    </div>

	  <!-- Toggle Navigation (Mobile only)
      –––––––––––––––––––––––––––––––––––––––––––––––––– -->    
	   <div class="mobile-nav">
		<div id="toggle">
		  <div class="bar1"></div>
		  <div class="bar2"></div>
		  <div class="bar3"></div>
		  <div class="ham-title">Menu</div>
		</div>
	   </div><!--mobile-nav-->
	   
	  </div><!--desktop-nav-container--> 

	 </section>
	</header>
	 
	<main role="main" aria-label="when the content begins">

	  <!-- Mobile Navigation 
      –––––––––––––––––––––––––––––––––––––––––––––––––– -->    	
	  <div id="dropDownMenu" class="hiddenMenu">   
	   	   
	   <div class="mobile-flex-container">

		<a class="mobile-flex-item" href="#">	 
		 <img src="https://drewgoff.com/images/icons/portfolio-icon.svg" class="img-responsive-centered" alt="suitcase" width="85" height="70"><br />
		 <p class="active-link">Portfolio</p>
		</a>
	
		<a class="mobile-flex-item" href="#">	
		 <img src="https://drewgoff.com/images/icons/about-icon.svg" class="img-responsive-centered" alt="about-icon" width="85" height="70"><br />
		 <p class="white-link">About</p>
		</a>

		<a class="mobile-flex-item" href="#">			 
		 <img src="https://drewgoff.com/images/icons/lab-icon.svg" class="img-responsive-centered" alt="lab" width="85" height="71"><br />	
		 <p class="white-link">Lab</p>
		</a>
		
		<a class="mobile-flex-item" href="#">			 
		 <img src="https://drewgoff.com/images/icons/music-logo.svg" class="img-responsive-centered" alt="music" width="85" height="71"><br />
		 <p class="white-link">Music</p>
		</a>
		
		<a class="mobile-flex-item" href="#">	 
		 <img src="https://drewgoff.com/images/icons/resume-icon.svg" class="img-responsive-centered"  alt="resume-icon" width="85" height="70"><br />		 
		 <p class="white-link">Resume</p>
		</a>		

		<a class="mobile-flex-item" href="#">	 
		 <img src="https://drewgoff.com/images/icons/contact-icon.svg" class="img-responsive-centered" alt="contact-icon" width="85" height="70"><br />
		 <p class="white-link">Contact</p>
		</a>	
	
	   </div>
	  </div>
</main>
            
          
!

CSS

            
              // variables //
$super-white:        #ffffff;
$white:   		 	     #f2f2f2;
$off-white:			     #e5e5e5;
$white-grey:	 	     #c5c5c5;
$light-pale-grey:    #7c7c81;
$light-grey-grey:	   #636367;
$super-light-grey:	 #56565a;
$light-grey-blue: 	 #4a4a4d;
$dark-grey-blue: 	   #313133;
$dark-black-blue: 	 #252526;
$lighter-pink: 			 #F65BA6;
$light-pink:	 	     #ff4d79;
$medium-pink:		     #ff3366;
$dark-pink: 		     #ea2e6d;
$title-font:	   	   'Anton', sans-serif;
$bold-font-weight: 	  400;
$body-font:		   	   'Nunito', sans-serif;
$medium-font-weight:  400; 
$regular-font-weight: 300;  

/* =====================
	    Google Fonts
======================== */
@import url('https://fonts.googleapis.com/css?family=Anton|Nunito:300,400');

/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */
html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,
legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6 
{margin:0;padding:0}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
ul{list-style:none}
button,input,select,textarea{margin:0}
html{box-sizing:border-box}
*,*:before,*:after{box-sizing:inherit}
img,embed,iframe,object,audio,video{height:auto;max-width:100%}
iframe{border:0}table{border-collapse:collapse;border-spacing:0}
td,th{padding:0;text-align:left}

/* =====================
	        Body
======================== */
html { font-size: 62.5%; }
html, body { height: 100%; min-width: 320px; }


body {
   display: flex;
   flex-direction: column;
   background-color: $light-grey-blue;
   color: $white;
   font-size: 17px;
   line-height: 1.6;
   font-family: $body-font;
}  

a {
  color: $medium-pink;
  text-decoration: none;
  &:hover {
	color: $dark-pink;
    outline: 0;
  }
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

li { display: inline; }
hr { border: 0.5px solid $dark-pink; }

main { 
  flex: 1 0 auto; 
  padding-top: 80px; 
}

@media only screen and (max-width: 767px) {
 main { padding-top: 70px; }
}

section {
   padding: 0 15px 0 15px;  
   margin: 0 auto;
   max-width: 1440px;
}


/* =====================
	     Typography
======================== */
h1, h2, h3, h4, h5, h6 { 
	font-family: $title-font; 
	font-weight: $bold-font-weight; 
	letter-spacing: 2.77px; 
	color: $white;
	line-height: 1.25;
	margin-top: 4px;
	margin-bottom: 4px;
}

h1 { 
 font-size: 3.0rem; 
 text-shadow: 0px 3px 16px rgba(50, 50, 50, 0.75); 
}
h2 { font-size: 2.5rem; }
h3 { font-size: 2.0rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.0rem; }
h6 { font-size: 0.5rem; }

strong {
	color: $dark-pink;
	font-family: $title-font;
	font-weight: $medium-font-weight;
	letter-spacing: 1px;
	display: inline-block;
	font-size: 1.7rem;
}

p {
  display: inline-block;
  color: $white;
  margin-left: 0;
  margin-right: 0;
  font-size: 1.7rem;
  font-weight: $regular-font-weight;
  letter-spacing: 1px;
  line-height: 1.3;
}

header {
 background: $dark-grey-blue;
 background: -moz-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
 background: -webkit-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
 background: linear-gradient(to bottom, $dark-grey-blue 0%, $dark-black-blue 100%);  
 border-bottom: 1.5px solid $dark-grey-blue;
 box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
 height: 80px;
 position: fixed;
 width: 100%;
 z-index: 3;
}

@media only screen and (max-width: 767px)  {
 header { height: 70px; }
}

#logo {
  height: 80px;
  margin-top: 1rem;
  margin-left: 0.5em;
  width: 200px; }

#name {
  color: $white;
  font-family: $title-font;
  font-size: 1.75em;
  letter-spacing: 1px;
  text-align: left; }

#title {
  color: $white-grey;
  font-family: $body-font;
  font-size: .715em;
  font-weight: 300;
  letter-spacing: 3px;
  line-height: 0;
  margin-top: -2px;
  text-align: left;
 }

.highlight { color: $medium-pink; font-size: 1.3rem; }

@media only screen and (max-width: 767px)  {
 #logo  { margin-top: 0.5rem; }	
}



/* ============================
 Desktop: Navigation Section
=============================*/		
.desktop-nav-container {
  align-content: flex-start;
  align-items: flex-start; 
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.desktop-nav-item:nth-child(1) {
  align-self: auto;
  flex: 1 1 auto;
  height: 80px; 
}

.desktop-nav-item:nth-child(2) {
  align-self: auto;
  flex: 2 1 auto;
  height: 80px; 
}

.desktop-nav {
  float: right; 
  margin-right: 0.9rem;
  margin-top: 1.5em;
}

.top-nav {
  color: $white-grey;
  font-family: $title-font;
  font-size: 1.75rem;
  letter-spacing: 1px;
  padding-left: 40px;
  transition: 0.3s; 
}

.top-nav:hover {
  color: $white;
  cursor: pointer; 
}

.active-link { color: $dark-pink; }		
.active-link:hover { color: $dark-pink; }		
.mobile-nav { display: none; }

@media only screen and (max-width: 900px) {
 .desktop-nav { margin-top: 1.6em; }
 .top-nav { font-size: 1.6rem; padding-left: 30px;  } 
 .active-link { color: $dark-pink; }
}	   

@media only screen and (max-width: 767px) {
  .desktop-nav { display: none; } 
  .mobile-nav  { display: inline-block; float: right; }
}


/* ===========================
  Mobile: Toggle Section
============================*/
#toggle {
  cursor: pointer;    
  display: inline-block;
  margin: 0.5rem 0.5rem 0 0;
}

.bar1 {
  background: $light-pink;  
  height: 3px; 
  margin: 8px 0;  
  transition: 0.3s;  
  width: 25px;
}

.bar2 {
  background: $medium-pink;
  height: 3px;
  margin: 8px 0;  
  transition: 0.3s;  
  width: 30px;
}

.bar3 {
  background: $dark-pink;	
  height: 3px;
  margin: 8px 0;
  transition: 0.3s;
  width: 35px;
}

.ham-title {
  color: $white;	
  font-family: $body-font;
  font-size: 1.35rem;
  font-weight: $regular-font-weight;
  letter-spacing: 1px;
  margin-top: -5px;      
}

.change .bar1 {
  background: $dark-pink;
  background: -moz-linear-gradient(left, $dark-pink 20%, $white-grey 80%);
  background: -webkit-linear-gradient(left, $dark-pink 20%, $white-grey 80%);
  background: linear-gradient(to right, $dark-pink 20%, $white-grey 80%);
  transform: rotate(-45deg) translate(-9px, 6px);
  -webkit-transform: rotate(-45deg) translate(-9px, 6px);
  width: 35px;
}

.change .bar2 {opacity: 0;}

.change .bar3 {
  background: $white-grey;
  background: -moz-linear-gradient(left, $white-grey 20%, $dark-pink 80%);
  background: -webkit-linear-gradient(left, $white-grey 20%, $dark-pink 80%);
  background: linear-gradient(to right, $white-grey 20%, $dark-pink 80%);
  transform: rotate(45deg) translate(-8px, -8px);
  -webkit-transform: rotate(45deg) translate(-8px, -8px);   
}

/* ===========================
  Mobile: Dropdown Section
============================*/
.hiddenMenu {
  background: $dark-grey-blue;
  background: -moz-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
  background: -webkit-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
  background: linear-gradient(to bottom, $dark-grey-blue 0%, $dark-black-blue 100%);  
  border-bottom: 1.5px solid $dark-grey-blue; 
  -webkit-box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
  -moz-box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
  box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4); 
  max-width: 100%;
  position: fixed;
  -webkit-transform: translateY(-400%);
          transform: translateY(-400%);
  transition-timing-function: ease-in;
  transition: 0.5s;
  z-index: 2;
}

.activeMenu {
  background: $dark-grey-blue;
  background: -moz-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
  background: -webkit-linear-gradient(top, $dark-grey-blue 0%, $dark-black-blue 100%);
  background: linear-gradient(to bottom, $dark-grey-blue 0%, $dark-black-blue 100%); 
  border-bottom: 1.5px solid $dark-grey-blue;  
  -webkit-box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
  -moz-box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
  box-shadow: 0px 3px 5px 0px rgba(37,37,38,0.4);
  position: fixed;
  -webkit-transform: translateY(0);
          transform: translateY(0);
  transition-timing-function: ease-out;
  transition: 0.5s;
  width: 100%;
  z-index: 2;
}

@media only screen and (min-width: 767px) {
  .hiddenMenu { display: none; } 
  .activeMenu  { display: none; }
}

.mobile-flex-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 15px 0 15px;
}

.mobile-flex-item:nth-child(1), .mobile-flex-item:nth-child(2), 
.mobile-flex-item:nth-child(3), .mobile-flex-item:nth-child(4),
.mobile-flex-item:nth-child(5), .mobile-flex-item:nth-child(6) {
  flex-basis: auto;
  flex-grow: 1;
  height: auto;
  margin: 5px;
  padding: 5px;
  text-align: center;
  width: 90px;
}


@media only screen and (max-width: 650px) {
.mobile-flex-item:nth-child(1), .mobile-flex-item:nth-child(2), 
.mobile-flex-item:nth-child(3), .mobile-flex-item:nth-child(4),
.mobile-flex-item:nth-child(5), .mobile-flex-item:nth-child(6) {
  width: 70px;
 }	
}

@media only screen and (max-width: 610px) {
.mobile-flex-item:nth-child(1), .mobile-flex-item:nth-child(2), 
.mobile-flex-item:nth-child(3), .mobile-flex-item:nth-child(4),
.mobile-flex-item:nth-child(5), .mobile-flex-item:nth-child(6) {
  width: 150px;
 }	
}

@media only screen and (max-width: 510px) {
.mobile-flex-item:nth-child(1), .mobile-flex-item:nth-child(2), 
.mobile-flex-item:nth-child(3), .mobile-flex-item:nth-child(4),
.mobile-flex-item:nth-child(5), .mobile-flex-item:nth-child(6) {
  width: 120px;
 }	
}

@media only screen and (max-width: 430px) {
.mobile-flex-item:nth-child(1), .mobile-flex-item:nth-child(2), 
.mobile-flex-item:nth-child(3), .mobile-flex-item:nth-child(4),
.mobile-flex-item:nth-child(5), .mobile-flex-item:nth-child(6) {
  width: 90px;
 }	
}

p.white-link {
  color: $white;
  letter-spacing: 1px;
  text-decoration: none;
  text-size: 1.1rem; 
}
            
          
!

JS

            
              (function() {
 function mobileMenu() {
   document.getElementById("dropDownMenu").classList.toggle("activeMenu");
 }

 function toggleBtn(x) {
   x.classList.toggle("change");
 }

 document.getElementById("toggle").addEventListener('click', function() {
  toggleBtn(this);
  mobileMenu();
 });
}) ();
            
          
!
999px

Console