octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <!DOCTYPE html>
<html>


<head>
	<meta charset="UTF-8">
	<title>jte</title>
	<link rel="stylesheet" href="css/global.css">
</head>
<body>

<div class="page-wrap">
<header>
	<div class="logo">
		<a class="logo" href="/">jte</a>
	</div>

</header>

	<nav class="main-nav">
		<li><a href="/">Typefaces</a></li>
		<li><a href="">Lettering</a></li>
		<li><a href="">FAQ</a></li>
	</nav>

</div>  <!--- END div.page-wrap -->
<section class="fonts">
	<article>
		<h1>Duke</h1>
    <ul class="font-btns">
		  <li><a href="">$75 BUY</a></li>
		  <li><a href="">PDF</a></li>
		</ul>
		
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit, nunc a viverra ultrices, leo ipsum faucibus elit, in fermentum magna eros sed ante. Donec est mauris, consequat eget viverra a, gravida tempor lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam sodales congue dignissim. Vivamus eleifend laoreet erat, vel pharetra nibh facilisis id. 
</p>
	</article>
	<article>
		<h1>Edmondsans</h1>
		<ul class="font-btns">
		  <li><a href="">$75 BUY</a></li>
		  <li><a href="">PDF</a></li>
		</ul>
		
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit, nunc a viverra ultrices, leo ipsum faucibus elit, in fermentum magna eros sed ante. Donec est mauris, consequat eget viverra a, gravida tempor lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam sodales congue dignissim. Vivamus eleifend laoreet erat, vel pharetra nibh facilisis id. 
</p>
	</article>
	<article>
		<h1>Hattery</h1>
    <ul class="font-btns">
		  <li><a href="">$75 BUY</a></li>
		  <li><a href="">PDF</a></li>
		</ul>
		
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit, nunc a viverra ultrices, leo ipsum faucibus elit, in fermentum magna eros sed ante. Donec est mauris, consequat eget viverra a, gravida tempor lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam sodales congue dignissim. Vivamus eleifend laoreet erat, vel pharetra nibh facilisis id. 
</p>
		
	</article>
	<article>
		<h1>Mission Gothic</h1>
    <ul class="font-btns">
		  <li><a href="">$75 BUY</a></li>
		  <li><a href="">PDF</a></li>
		</ul>
		
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit, nunc a viverra ultrices, leo ipsum faucibus elit, in fermentum magna eros sed ante. Donec est mauris, consequat eget viverra a, gravida tempor lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam sodales congue dignissim. Vivamus eleifend laoreet erat, vel pharetra nibh facilisis id. 
</p>
		
	</article>
</section>




</body>


	</html>
            
          
!

CSS

            
              @import "compass/css3";



body {
	
}
h1 {
    font-size: 2em;
    text-align: center;
    padding: 50px;
}

a {
  text-decoration: none;
  color: #101010;
  border-bottom: 2px solid transparent;  
}

// -------------------------------------- HEADER
.logo {
	 margin: 50px auto 10px;
	 width: 33px;
	 height: 34px;
	 padding: 8px;
	a {
		background: #e05f5a;
		color: white;
		
	}
}

// ---------------------------------------NAV
.main-nav {  
	list-style: none;
	margin: 0 auto 100px auto;
	padding: 0;
	text-align: center;
	
	li {
		display: inline;
	}
	a {
		display: inline-block;
		padding: 5px;

	}
	

	a:hover {
		border-bottom: 2px solid;
		position: relative;
	}

	a:active {
		text-decoration: underline;
	}
}

.font-btns {
	list-style: none;
	margin: 0 auto 20px auto;
	padding: 0;
	text-align: center;
	
	li {
		display: inline;
	}
	a {
		display: inline-block;
		padding: 5px;
		color: white;

	}
}

// -------------------------------------- PAGE
.page-wrap {
	width: 55%;
	margin: 0 auto;
	padding: 5px;

}

.pointer {
    cursor: pointer;
    }

article p {
  width: 35%;
  margin: 0 auto 10px;
}

// -------------------------------------- EXPANDED VIEW
.font-btns {
	list-style: none;
	margin: 0 auto 20px auto;
	padding: 0;
	text-align: center;
	
	li {
		display: inline;
	}
	a {
		display: inline-block;
		padding: 5px;
		color: white;

	}
}

.expanded {
	background: #e05f5a;
	color: white;
	width: 100%;

	p {
	padding: 10px 5px 30px 5px;
	width: 35%;
	margin: 0px auto 10px auto;
}

}



            
          
!

JS

            
              $('article p, article .font-btns').hide();

$('article h1').addClass('pointer').click(function() {
  $(this).siblings().toggle('slow').parent().toggleClass('expanded');
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console