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.

            
              <nav class="nav">
	
  <div class="nav__outer-wrap">
	  
    <div class="nav__heading">
      <a class="nav__link bold" href="#">GC Admissions</a>
    </div>
	  
    <ul class="nav__inner-wrap">
      <li class="nav__item">
        <a class="nav__link" href="#">Apply</a>
      </li>
      <li class="nav__item">
        <a class="nav__link" href="#">Visit Campus</a>
      </li>
      <li class="nav__item">
        <a class="nav__link" href="#">Deposit</a>
      </li>
      <li class="nav__item">
        <a class="nav__link" href="#">Financial Aid</a>
      </li>
      <li class="nav__item">
        <a class="nav__link" href="#">Meet Your Counselor</a>
      </li>
      <li class="nav__item">
        <a class="nav__link" href="#">Contact Us</a>
      </li>
    </ul>
	  
  </div>
	
</nav>
            
          
!
            
              @use postcss-nested;
@use postcss-simple-vars;

$purple: #8b75a6;
$gray-100: #f5f5f5;
$gray-300: #e0e0e0;
$gray-850: #323232;

$nav-height: 2.5em;
$page-max-width: 1260px;

/* reset */
html {
	-ms-text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	box-sizing: border-box;
}
*, :after, :before {
	box-sizing: inherit;
}
body {
	font: 16px/1.5 Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;
	color: $gray-850;
}
body, ul {
	margin: 0;
}
ul {
	padding: 0;
}
li {
	display: block;
}
a {
	color: inherit;
	text-decoration: none;
}

/* utility */
.bold {
	font-weight: 600;
}

/* nav component */
.nav {
	width: 100%;
	line-height: $nav-height;
	background-color: $gray-100;
	border-bottom: 1px solid $gray-300;
	overflow: hidden;

	/* hide horizontal scrollbar */
	-ms-overflow-style: none; 
	::-webkit-scrollbar { 
		width: 0; 
	}
	
	/* 
		height maintained by placeholder. 
		this makes it easy to eventually make this menu fixed (if we want to do that)
	*/
	position: absolute;
	z-index: 1;
}
.nav, .nav__placeholder {
	height: $nav-height;
}

.nav__outer-wrap {
	display: flex;
	justify-content: space-between;
	height: 65em;
	width: $page-max-width;
	max-width: 100%;
	margin: 0 auto;
}
.nav__heading {
	display: inline-block;
	flex-shrink: 0;
	flex-grow: 1;
	height: $nav-height;
	margin-right: -10em;

	z-index: 2 /* so leftmost nav__item's don't cover it on scroll */
}
.nav__inner-wrap {
	white-space: nowrap;
	height: 65em;
	display: flex;
}
.nav__item {
	height: $nav-height;
	flex-shrink: 0;
}
.nav__item:first-child {
	margin-left: 10em;
}
.nav__link{
	display: block;
	padding: 0 .625em;
	vertical-align: top;
	&:hover, &:focus {
		background-color: $purple;
		color: white;
		border-bottom-color: $purple;
	}
}
@media only screen and (max-width:479px) {
	.nav__outer-wrap {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	}
}
@media only screen and (min-width:480px) {
	.nav__inner-wrap {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	}
	.nav__heading {
		background-color: $gray-300;
	}
}
@media screen and (min-width:1024px) {
	.nav__outer-wrap {
		position: relative;
		padding-right: 0;
	}
	.nav__heading {
		background-color: transparent;
	}
	.nav__link {
		padding: 0 1em;
	}
}
            
          
!
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