cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <link href='//fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<header class="header">
			<!-- Logo -->
			<a class="logo" href="https://www.savetherhino.org" title=" font-family: Lato, sans-serif">RHINO</a>
  <nav><!-- MAIN MENU <div class="navicon">&#9776;</div> <div class="navicon">?</div> -->
				<input type="checkbox" id="show-menu-input-checkbox" role="button">
				<label for="show-menu-input-checkbox" id="main-menu-toggler" class="flex-container flex-vcenter flex-hcenter"><div id="main-menu-toggler-icon" class="flex-grow"></div></label>
				<ul class="mainMenu accordion" id="mainMenu"><li><a href="https://commons.wikimedia.org/wiki/Kunstformen_der_Natur" target="_blank">life</a></li><li><a href="https://en.wikipedia.org/wiki/Douglas_Adams" target="_blank">universe</a></li><li><a href="https://archive.org/details/internetarcade" target="_blank">fun</a></li><li><a href="https://archive.org/details/prelinger" target="_blank">archive</a></li><li><a href="https://www.katetempest.co.uk" target="_blank">fight</a></li><li><a href="https://no.wikipedia.org/wiki/Siv_(mytologi)" target="_blank">love</a></li><li><a href="http://www.dankaplantrio.com" target="_blank">waves</a></li><li><a href="https://www.theguardian.com/us-news/edward-snowden" target="_blank">happening</a></li></ul>
  </nav>
</header>
<main><p>The toggle animation is forked from <a href="https://codepen.io/CreativeJuiz/">Geoffrey Crofte</a>'s nice <a href="https://codepen.io/CreativeJuiz/pen/oCBxz?editors=0010">'Menu Toggle button with flat menu' pen</a>.</p>
  <p>The CSS only stuff is based off <a href="https://medialoot.com/blog/how-to-create-a-responsive-navigation-menu-using-only-css">Tony Thomas' article at medialoot</a> and <a href="http://stackoverflow.com/questions/18752134/reveal-and-hide-a-div-on-checkbox-condition-with-css">a question at stackoverflow</a>. It's true, though, <a href="https://css-tricks.com/responsive-menu-concepts/">as pointed out at CSS tricks</a>, that it's bad semantics, but it's quite a simple solution, anyhow.</p>
  <p>These pages were a great help to get a grip on flexbox magic:</p>
  <ul>
    <li><a href="http://www.heydonworks.com/article/flexbox-grid-finesse">http://www.heydonworks.com/article/flexbox-grid-finesse</a></li>
    <li><a href="https://codepen.io/heydon/pen/GpbQdP">https://codepen.io/heydon/pen/GpbQdP</a></li>
    <li><a href="https://philipwalton.github.io/solved-by-flexbox/">https://philipwalton.github.io/solved-by-flexbox/</a></li>
    <li><a href="http://apps.workflower.fi/css-cheats/?name=flexbox">http://apps.workflower.fi/css-cheats/?name=flexbox</a></li>
  </ul>
</main>
            
          
!
            
              /* 
  RESETS
/*-----------------------------------------------------*/
html{
  box-sizing: border-box;
  width:100%;height:100%;
  margin:0;padding:0;
  font-family: Lato, sans-serif;
}
body{
  width:100%;height:100%;margin:0;padding:0;
  border:1px dotted gray;
}
*, *:before, *:after {
	box-sizing: inherit;
}
header ul, menu, dir {
    margin-block-end: 0;
    margin-block-start: 0;
    padding-inline-start: 0;
    -webkit-padding-start: 0;
}
a{text-decoration:none;color:rgba(255,102,0,1);}

/* 
  LAYOUT
/*-----------------------------------------------------*/
:root{
	--maxSiteWidth:1080px;
}
main{
  margin: 90px auto;padding:1em;
}
header {
    display: flex;
    flex-flow: row nowrap;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,1);
    height: 80px;
    border-bottom: rgba(44,44,44,.6) 1px solid;
    margin: 0 auto 0 auto;
}
.logo {
    height:80px;
    flex: 0 0 200px;
    font-size:42px;display:block;text-align:center;align-items:center;justify-content:center;margin:14px auto;
}

/*  
   MAIN MENU MOBILE FIRST
/*-------------------------------------------------------*/
nav{flex:1 auto;}
.mainMenu{
  position: fixed;top:0;left: 0;right: 0;
  margin:80px auto 0 auto;
	height:90%;/**hack for opera mini**/
	height:calc(100% - 79px);
  width:100%;
  flex-flow:column nowrap;
  align-content:stretch;
  display:none;
}
.mainMenu a{
  flex:1;
  width:100%;
  justify-content: center;
  align-items:center;
  font-size:26px;
  display:flex;
  background:transparent;
}
.mainMenu>li {
	flex:1;
  display:flex;
  flex-flow:column nowrap;
  align-items:center;
  text-align:center;
	border-bottom: 1px dotted rgba(22,22,22,.3);
  background:rgba(255,255,255,1);
}

/*  
  MAIN MENU TOGGLE BUTTON
/*-----------------------------------------------------*/
/*Hide checkbox*/
#show-menu-input-checkbox{
	display: none;
}
/*Show menu when invisible checkbox is checked*/
#show-menu-input-checkbox:checked ~ .mainMenu{
	display: flex;
}
#main-menu-toggler {
  width:80px;
  height:80px;
  position:fixed;
  top:0;
  right:0;
  padding:24px;
  display:flex;
  justify-content:center;align-items:center;
}
#main-menu-toggler-icon:after,
#main-menu-toggler-icon:before {
content: "";
position: absolute;
left: 0;
top: -9px;
}
#main-menu-toggler-icon:after{
top: 9px;
}
#main-menu-toggler-icon {
position: relative;
display: block;
}
#main-menu-toggler-icon,
#main-menu-toggler-icon:after,
#main-menu-toggler-icon:before {
width: 100%;
height: 5px;
background-color:rgba(22,22,22,1);
transition: all 0.3s;
backface-visibility: hidden;
border-radius: 2px;
}
/* on menu activation */
#show-menu-input-checkbox:checked ~ #main-menu-toggler>#main-menu-toggler-icon {
background-color: transparent;
}
#show-menu-input-checkbox:checked ~ #main-menu-toggler>#main-menu-toggler-icon:before {
transform: rotate(45deg) translate(5px, 5px);
}
#show-menu-input-checkbox:checked ~ #main-menu-toggler>#main-menu-toggler-icon:after {
transform: rotate(-45deg) translate(7px, -8px);
}

/*
  MAIN MENU ON WIDE SCREENS
/*----------------------------------------------------------*/
@media only screen and (min-width: 1080px) {
	header,.mainMenu,nav,main,article,footer{max-width:var(--maxSiteWidth);}
	/**HIDE THE MENU TOGGLER**/
	#main-menu-toggler{display:none;}
	/**APPLY HORIZONTAL BAR STYLING TO THE MAIN MENU**/
	.mainMenu{
    position: initial;
    display:flex;
    flex-flow:row nowrap;
    flex-direction: row;
    justify-content: flex-end;
    height:80px;
    margin-top:0;
  }
	.mainMenu>li {
    flex:1 0 auto;
    border-bottom:none;
    background:transparent;
    align-items:initial;
  }
	.mainMenu a{
    font-size:22px;
    width:auto;
    justify-content: flex-end;
    padding-left:16px;
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console