Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <!--NAVIGATION BEGINS-->	
	<nav id ="navigation">
		<a href="About">About</a>
		<a href="Services">Services</a>
		<a href="Awards">Awards</a>
		<a href="Blog">Blog</a>
		<a href="Contact">Contact</a>
	</nav>
<!--JUMBOTRON BEGINS-->
	<section id="jumbotron">
		<div id = "shade">
			<h1 id = "jumbotron-title"> "The toughest editor I've ever worked with"</h1>
			<h3> - Stephen King</h3>
			<div id ="read-more-container">
				<h4 id = "read-more">Read More</h4>
				<i id ="arrow-down" class="fas fa-arrow-down"></i>
			</div>
		</div>
	</section>
<!--ABOUT SECTION BEGINS-->
<section id="about-container">
	<div class= "about-container-half">
		<h1 id= "about-testimonial">
			"Editing with the experience and track record to create a best seller."
		</h1>
	</div>
	<div class= "about-container-half">
		<div id = "yellow-shade">
			<h1 id="about-title">
				Meet Bill Thompson
			</h1>
			<div id="about-image">
				<img src="css/images/billthompson.png">
			</div>
			<div id = "about-text">
			<p>
				Bill Thompson began his long and successful publishing career carrying the bag, as a Doubleday book salesman in New Orleans and Memphis.
			</p>

<p>Thompson went on to stints at Everest House, G. P. Putnam, and as editor-in-chief of the now defunct Wynwood Press, where he published a book A Time to Kill, by a then-unknown writer named John Grisham.
			</div>	
		</div>	
	</div>
</section>
            
          
!

CSS

            
              html,body,nav,h1,h2,h3,h4,h5,h6,p,a{
	font-family: 'Open Sans Condensed', sans-serif;

	/*font-family: 'Inconsolata', monospace;*/
	/*font-family: 'Oxygen', sans-serif;*/
	margin: 0px;
	padding: 0px;
}
#navigation{
	display: flex;
	align-items: center;
	justify-content: space-around;
	width: 100%;
	position: fixed;
	height: 150px;
	font-size: 28px;
}
.active-nav{
	background: #EDD11C;
	color: black;
}
.active-nav a:link{
	color: black;

}
#navigation a:link{
	color: white;
	opacity: 1;
	text-decoration: none;
}
#navigation a:hover .active-nav a:hover{
	color: white;
	text-decoration: underline;
	transition: ease-in 0.3s;
}
#navigation a:visited, .active-nav a:visited{
	color: white;
	text-decoration: none;
}
#navigation a:active,  .active-nav a:active{
	color: white;
	text-decoration: none;
}
/*NAV STYLES END*/
/*JUMBOTRON STYLES*/
#jumbotron{
	background-image: url("https://images.unsplash.com/photo-1473186505569-9c61870c11f9?ixlib=rb-0.3.5&s=8f756ca31e306b6d25a887c1e5ee1011&auto=format&fit=crop&w=1050&q=80");
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	height: 100vh;
	color: white;
}
#jumbotron #shade{
	text-align: center;
	height: 100vh;
	background:rgba(0,0,0,0.4);
}
#jumbotron div h1{
	font-size: 48px;
	letter-spacing: 1px;
}
#jumbotron div h3{
	margin-top: 10px;
	margin-bottom: 15px;
}
#read-more-container{
	width: 100px;
	margin:auto;
}
#read-more-container:hover{
	cursor: pointer;
	padding-top: 5px;
	transition: ease-in 0.4s;
}
/*JUMBOTRON STYLES END*/
/*ABOUT SECTION STYLES*/
#about-container{
	height: 100vh;
	width:100%;
}
#about-container .about-container-half{
	width:50%;
	float:left;
	height: inherit;
}
#about-container .about-container-half #about-testimonial{
	width: 90%;
	margin: auto;
	font-size: 3em;
	line-height: 1.5;
	letter-spacing: 2px;
	color: #EDD11C;
}
#about-container .about-container-half:nth-child(2){
	background: #EDD11C;
}
#about-container .about-container-half #yellow-shade{
	
	height: inherit;
	background:rgba(255,255,255,0.7);
}
#about-container #about-title{
	text-align: center;

}
#about-container #about-image{
	width:30%;
	margin:auto;
}
#about-container #about-image img{
	width: 100%;
	height: 100%;
	 
}
#about-container #about-text{
	
}

            
          
!

JS

            
              function paddingTop(a,b){
	  var sectionHeight = a.height();
	  var contentHeight = b.height();
	  var equation = (sectionHeight/2 ) - (contentHeight/2);
	   b.css('padding-top', equation);
	}
	 paddingTop($('#jumbotron'),$('#jumbotron-title'));
	 paddingTop($('#about-container'), $('#about-testimonial'));


	$(window).on('resize', function(){
	 paddingTop($('#jumbotron'),$('#jumbotron-title'));
	 paddingTop($('#about-container'), $('#about-testimonial'));
	});

//Below is for fixed Nav activation
function activateFixedNav(){
		if($("#navigation").offset().top > 100){
			console.log('IT works');
			$("#navigation").addClass("active-nav");

		}else{
			$("#navigation").removeClass("active-nav");
		}

	}
		
activateFixedNav();

	
$(window).on('scroll', function(){
		
		activateFixedNav();
	
	});

console.log($("#about-container").offset().top);
            
          
!
999px

Console