Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                <header></header>
<main>
	<div class="navContainer"> 
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="line"></div>
			<div class="navItem-label">Step 1</div>
		</a>
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="line"></div>
			<div class="navItem-label">Step 2</div>
		</a>
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="line"></div>
			<div class="navItem-label">Step 3</div>
		</a>
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="line"></div>
			<div class="navItem-label">Step 4</div>
		</a>
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="line"></div>
			<div class="navItem-label">Step 5</div>
		</a>
		<a href="#" class="navItem">
			<div class="innerCircle">
				<i class="fa fa-check icon icon-check"></i>
				<i class="fa fa-arrow-right icon icon-right"></i>
			</div>
			<div class="navItem-label">Step 6</div>
		</a>
	</div>
	<div class="contentContainer">
		<div id="stepOne" class="content" data-content="1">
			<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p>
			<p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
		</div>
		<div id="stepTwo" class="content" data-content="2">
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>
		</div>
		<div id="stepThree" class="content" data-content="3">
			<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.</p> 
			<p>Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.</p>			
		</div>
		<div id="stepFour" class="content" data-content="5">
			<p> Morbi dapibus, metus eu pellentesque vulputate, justo mi dapibus nibh, at dapibus tortor sem in urna. Pellentesque vel tristique nunc.  Nullam et neque id enim rhoncus accumsan. Sed eu tempus turpis. Morbi in dui dui. In aliquet, lectus eget pellentesque suscipit, leo mauris rhoncus purus, ut vestibulum enim purus vel lectus.</p>
		</div>
		<div id="stepFive" class="content" data-content="5">
			<p>In aliquet, lectus eget pellentesque suscipit, leo mauris rhoncus purus, ut vestibulum enim purus vel lectus. Morbi dapibus, metus eu pellentesque vulputate, justo mi dapibus nibh, at dapibus tortor sem in urna. Pellentesque vel tristique nunc. Cras eget arcu vel arcu sagittis imperdiet. Vivamus rutrum blandit pharetra. Maecenas fermentum purus in nibh auctor, at pellentesque elit congue. Nullam et neque id enim rhoncus accumsan. Sed eu tempus turpis. Morbi in dui dui. </p>
		</div>
		<div id="stepSix" class="content" data-content="6">
			<p>Mauris tortor dolor, ullamcorper eu volutpat eget, semper at massa. Morbi pharetra accumsan faucibus. Proin at tincidunt lectus. Donec sit amet leo nec justo tincidunt cursus. Suspendisse ac turpis vitae elit iaculis molestie a id lacus. Donec et ultrices dolor. Sed tristique sem ut orci tincidunt hendrerit.</p>
			<p>Vivamus justo eros, ultricies eu molestie id, ornare at ante. Etiam porta posuere nibh a suscipit. Maecenas sodales tempus gravida. Interdum et malesuada fames ac ante ipsum primis in faucibus. In ornare dolor nisl, non commodo est sagittis facilisis. Nam lacinia feugiat velit, non tincidunt eros auctor sed. </p>
		</div>
	</div>
	<div class="control">
		<button id="prev" class="prev"><i class="fa fa-angle-left"></i>Previous</button>
		<button id="next" class="next">Next<i class="fa fa-angle-right"></i></button>
	</div>

</main>
<footer></footer>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

body {
	display: grid;
	grid-template-areas: "header"
								"main"
								"footer";
	grid-template-columns: 1fr;
	grid-template-rows:  40px 1fr 40px;
	height: 100vh;
	max-height: 100%;
	overflow: none;
	padding: 25px;
	background-color: #fbfdfd;
	color: #6e6e6e;
	font-family: 'Verdana', sans-serif;
}

p {
	margin-bottom: 15px;
	line-height: 1.5;
}

header {
	 grid-area: header;
}

main {
	// background-color: #e3e3e3;
	grid-area: main;
	display: grid;
	grid-template-areas: "nav"
								"content"
								"control";
	grid-template-columns: 1fr;
	grid-template-rows: 1fr 3fr 1fr;
	padding: 20px;
}

.navContainer {
	display: flex;
	justify-content: center;
	margin-bottom: 45px;
	grid-area: "nav";
}

.navItem {
	display: inline-block;
	position: relative;
	min-width: 100px;
	margin-right: 10px;
	text-decoration: none;
	color: #ddd;
	max-height: 95px;
	
	&:last-child {
		margin-right: 0;
		width: auto;
		min-width: 0;
	}
	
	&.active {
		.innerCircle {
			border-color: #abdf75;
		}
		.icon-right {
			color: #abdf75;
			visibility: visible;
		}
		.navItem-label {
			color: #abdf75;
		}
	}
	
	&.visited {
		.innerCircle {
			border-color: #c75000;
		}
		.icon-check {
			color: #c75000;
			visibility: visible;
		}
		.icon-right {
			visibility: hidden;
		}
		
		.navItem-label {
			color: #c75000;
		}
		
		.line {
			opacity: 1;
			background-color: #c75000; 
		}
	}
}

.innerCircle {
	display: inline-block;
	border: 6px solid #dedede;
	border-radius: 50%;
	padding: 20px;
	position: relative;
	transition: all 0.3s ease-in;
	
	&.active {
		border-color: #abdf75;
	}
}

.icon {
	color: #dedede;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	visibility: hidden;
	
	&-right {
		color: #abdf75;
	}
}

.line {
	display: inline-block;
	width: 40px;
	height: 8px;
	background-color: #dedede;
	border-radius: 30px;
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50% - 220px);
	opacity: 0;
	transition: opacity .3s ease-in;
}

.navItem-label {
	margin-top: 15px;
	transition: all .3s ease;
}

.contentContainer {
	padding: 30px 0;
	grid-area: "content";
	position: relative;
	overflow: hidden;
	margin-bottom: 30px
}

.content {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	text-align: justify;
	opacity: 0;
	transition: all .3s ease;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 20px;
	height: 100%;
	overflowY: auto;
	
	&.active {
		opacity: 1;
	}
}

.control {
	text-align: center;
	grid-area: "control";
}

.next, 
.prev {
	font-family: 'Verdana', sans-serif;
	background: none;
	display: inline-block;
	width: 140px;
	margin: 0 15px;
	text-align: center;
	padding: 15px;
	border: 2px solid;
	border-radius: 30px;
	transition: all .3s ease;
	font-weight: bold;
}

.next {
	color: #abdf75;
	border-color: #abdf75;	
	
	&:hover {
	background-color: #abdf75;
	color: #fff;
	}
	
	i {
		margin-left: 10px;
	}
}



.prev {
	color: #c75000;
	border-color: #c75000;
	
	&:hover {
		background-color: #c75000;
		color: #fff;
	}
	
	i {
		margin-right: 10px;
	}

}


footer {
	grid-area: footer
}
              
            
!

JS

              
                (function navigation() {
	var navs = document.getElementsByClassName('navItem'),
	    contents = document.getElementsByClassName('content'),
	    next = document.getElementById('next'),
	    prev = document.getElementById('prev'),
	    counter = 0;
	
	navs[counter].classList.add('active');
	contents[counter].classList.add('active');
	
	next.addEventListener('click', goToNext);
	prev.addEventListener('click', goToPrev);  
	
	function goToNext() {
		if(counter < (navs.length - 1)) {
			navs[counter].classList.remove('active');
			contents[counter].style.opacity = 0;
			counter += 1;
			var nav = navs[counter];
			var content = contents[counter];
			nav.classList.add('active');
			nav.previousElementSibling.classList.remove('active');
			nav.previousElementSibling.classList.add('visited');
			content.style.opacity = 1 ; 
		}
	} 
	
	function goToPrev() {
		if(counter > 0) {
			var that = navs[counter];
			var thatContent = contents[counter];
			counter -= 1;
			that.classList.remove('active');
			that.previousElementSibling.classList.remove('visited');
			that.previousElementSibling.classList.add('active');
			thatContent.style.opacity = 0;
			contents[counter].style.opacity = 1;  
		}
	} 	
})();
              
            
!
999px

Console