Pen Settings



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


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


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.


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.


                <div id="container">
  <h1><a href="#"><span>Blackout</span> God</a></h1>
<nav id="headernav">
  <a href="#">Home</a>
  <a href="#">Products</a>
  <a href="#">Order</a>	
  <a href="#"><span>Legal</span> Disclaimer</a></nav>	

  <img src="" style="width:20%; height: auto; float: left; margin-right: 5%; margin-top: 4rem;">
	<p><b>Blackout God</b> is the ultimate energy drink. It will hit you on the head with a Rickenbacker 4001 electric bass guitar. It will make you see through portals. It will spaghettify your body into a wet noodle, then juice you with the power of a thousand suns.
<p>We’ve achieved this by styling our drink with a unique combination of stimulants and psychoactive substances:
	<li>25mg Caffeine
	<li>35mg Sugar
	<li>15mg Taurine
	<li>22mg Ayahuasca
	<li>15mg Salvia divinorum
	<li>50mg Piper methysticum
	<li>12mg Artemisia absinthium
	<li>Ipomoea tricolor
<p>Blackout God is available from your local retailer. Look for the specially marked cryogenically sealed delivery mechanism.


                * { box-sizing: border-box; }
body { 
  margin: 0;
  font-family: Brandon-Grotesque, sans-serif; 
  color: #fff;
  background-image: url(, linear-gradient(#111 0%,#111 50%, #555 100%); 
  background-size: 35.5px 25px, 100% 100%; 
  background-blend-mode: exclusion;
header { 
  display: flex; 
  align-items: center;
  text-transform: uppercase;  
  background: rgba(0,0,0,0.2);
#headernav a { 
  text-transform: uppercase;
  color: #fff;
  transition: .3s;
  text-decoration: none;
  padding: .6rem 1rem; 
header h1 a > span { 
  background: #fff; 
  color: #000;
  padding: 0 1rem;
  display: inline-block;
  margin-right: .5rem;
header nav { 
  margin-left: 7%; 
header h1 { 
  margin: 0;
header h1 a {
 text-decoration: none; 
  color: #fff;
#headernav a { -webkit-transition: .3s; }
#headernav a:hover { background: #000; }

main { 
  background: rgba(0,0,0,0.3);
  width: 60%; padding: 1rem;
  margin-left: 20%; 
  font-size: 1.1rem;
  margin-top: 2rem; 
  margin-bottom: 1rem;
main ul { margin-left: 25%; }

@media all and (max-width: 850px) {
main {  
  width: 100%; margin: 0;
#headernav {
  position: absolute;
  right: -20%;
  top: 0;
  width: 20%;
  background: #000;
  height: 100%;
  -webkit-transition: .3s;
#headernav a { display: block; }
#headernav a:hover { background: #ccc; color: #000; }
#headernav a span { display: none; }

#headernav.slider { right: 0; }
header button { margin-left: 2rem; }



                var headernav = document.getElementById("headernav"),
container = document.getElementById("container"),
tablet = window.matchMedia("screen and (max-width: 850px)"),
header = document.getElementsByTagName("header")[0],
menulink = document.createElement("button"); = "menulink";
menulink.innerHTML = "MENU";

function switcheroo(state) {
if (tablet.matches) {
  } else {


menulink.addEventListener("click", function() {