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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                <body>

	<!-- HEADER AND NAVBAR SECTION -->
	<header id="header">
		
		<nav id="nav-bar">
			<div class="menu-icon">
				<i class="fa fa-bars"></i>
			</div>
			<div class="logo">
				<a href="#">
					<i><img id="header-img" src="https://png.icons8.com/ios/50/000000/teapot-filled.png"></i>
				</a>
			</div>
			<div class="menu">
				<ul>
					<li><a href="#features"class="nav-link">Features</a></li>
					<li><a href="#how-it-works"class="nav-link">How It Works</a></li>
					<li><a href="#products"class="nav-link">Products</a></li>
				</ul>
			</div>
		</nav>
	</header>

		<div id="title-showcase">
			<h1>Chocolate Teapots</h1>
			<a href="#features" class="btn">Learn More</a>
		</div>
	
	
	<!-- MAIN SECTION -->
	<main>

		<!-- FEATURES OF THE CHOCOPOT -->
		<div id="features">
			<h2 id="feature-title">Features</h2>
			<div id="feature-content">
				<div class="feature-grid">
					<div class="featureicon"><i class="far fa-smile"></i></div>
					<div class="feature-words">
						<h3>Pretty Good Quality Stuff</h3>
						<p>Our Chocopot materials are sourced from somewhere and made somewhere, so we're sure you'll probably be satisfied with our product.</p>
					</div>
				</div>
				<div class="feature-grid">
					<div class="featureicon"><i class="fas fa-crow"></i></div>
					<div class="feature-words">
						<h3>Quick Delivery</h3>
						<p>Order your Chocopot before 4pm today and we guarantee that it will be delivered at some point, maybe.</p>
					</div>
				</div>
				<div class="feature-grid">
					<div class="featureicon"><i class="far fa-times-circle"></i></div>
					<div class="feature-words">
						<h3>No Returns or Refunds</h3>
						<p>Now why would you need to retun something as awesome as the Chocopot?</p>
					</div>
				</div>
			</div>
		</div>
<hr>		
		<!-- VIDEO SHOWING THE FEATURES OF THE CHOCOPOT -->
		<div id="how-it-works">
			<h2>How It Works</h2>
			<iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/DkVZcCedKOU" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen alt="A video that doesn't really show anything">Sorry, your browser doesn't support embedded videos, 
				but don't worry, you can <a href="https://www.youtube.com/watch?v=DkVZcCedKOU">watch this video here</a> 
			</iframe>
		</div>
<hr>
		<!-- CHOCOPOT PRODUCTS -->
		<div id="products">
			<h2 id="product-title">Products</h2>
			<div id="product-grid">
				<div class="product-item">
					<h3>Basic Chocopot</h3>
					<p class="price">£100</p>
					<ul class="feature-list">
						<li>Lorem ipsum dolor.</li>
						<li>Lorem ipsum dolor.</li>
					</ul>
					<a href="" class="btn">Buy</a>
				</div>
				<div class="product-item">
					<h3>Delux Chocopot</h3>
					<p class="price">£199</p>
					<ul class="feature-list">
						<li>Lorem ipsum dolor.</li>
						<li>Lorem ipsum dolor.</li>
					</ul>
					<a href="" class="btn">Buy</a>
				</div>
				<div class="product-item">
					<h3>Fart in a Jam Jar</h3>
					<p class="price">£50</p>
					<ul class="feature-list">
						<li>Lorem ipsum dolor.</li>
						<li>Lorem ipsum dolor.</li>
					</ul>
					<a href="" class="btn">Buy</a>
				</div>
			</div>
		</div>
<hr>
		
	</main>

	<footer>
		<form id="form" action="https://www.freecodecamp.com/email-submit" method="get" target="_blank">
			<label for="email">Enter your email here to subscribe to our mailing list</label>
			<div>
			<input type="email" id="email" placeholder="example@example.com" name="email" required>
			<input type="submit" id="submit">
			</div>
		</form>
				<p>Website created by Emma Randall 2018 for FreeCodeCamp</p>
		<div><a href="https://icons8.com">Teapot Icon by Icons8</a> <a href="#">Back to Top</a></div>
	</footer>
</body>
</html>
              
            
!

CSS

              
                html {
	scroll-behavior: smooth;
}
body {
	background: #8dcad6;
	font-family: Helvetica, Arial;
	text-align: center;
	margin: 0;
}
h2{
	text-decoration: underline;
}
header {
	position: fixed;
	background: #b88dd6;
	height: ;
	top: 0;
 	/*display: flex;*/
	/*flex-direction: column;*/
	/*position: relative;*/
}


/*NAVBAR IN SCREENS BELOW*/

.logo {
	position: fixed;
	float: left;
	margin: 0 1em;
}
.logo a {
	text-dectoration: none;
}
#header-img {
	display: block;
}
#header-img:hover {
	transform: scale(1.2);
}

#nav-bar {
	position: fixed;
	width: 100%;
	z-index: 1;
	background: #d6a28d;
}
nav ul {
	overflow: hidden;
	list-style: none;
	padding: 10px 10px 0 10px;
	margin: 0;
	text-align: right;
	transition: 1s;
}
nav.brown ul {
	background: hsl(30, 62%, 31%);
}
nav ul li {
	display:inline-block;
	padding: 1em;
}
nav ul li a{
	text-decoration:none;
	text-transform: uppercase;
	font-size: 1em;
	color: #000;
}
nav ul li a:hover {
	color: #fff;
}

/*MENU ICON ON LARGER SCREENS (HAMBURGER)*/
.menu-icon {
	width: 100%;
	text-align: right;
	box-sizing: border-box;
	padding: 0.5em 1em 0 1em;
	cursor: pointer;
	color: #000;
	display: none;
	font-size: 30px;
}
.meunu-icon i:hover {
	color: white;
}

/*BUTTON UNIFORM*/
.btn {
	text-transform: uppercase;
	text-decoration: none;
	border: 2px solid white;
	color: white;
	padding: 0.5em;
	background: hsl(30, 62%, 30%);
	font-size: 1em;
width:100px;
align-self:center;
}
.btn:hover {
	opacity: 0.5;
}

#title-showcase {
	
	z-index: -1;
	height: 200px;
	width: auto;
	padding-top: 200px;
	padding-bottom: 120px;
	background: #b88dd6;
}
/*LANDING PAGE TITLE*/
/*#title-showcase {
	display: flex;
	flex-direction: column;
	position: relative;
	top: 50px;

}*/
/*#title-showcase {
	position: relative;
	display: inline-block;
	border: 5px solid white;
	background: #d6b48d;
	border-radius: 5px;
	top: 100px;
	padding: 1em 2em;
	
}*/
#title-showcase h1 {
	text-decoration:underline;
	justify-content: center;
	font-size: 4em;
}
/*#title-showcase blockquote {
		font-size: 3vh;
	}*/


main {
	display: flex;
	flex-direction: column;


}

/*FEATURES SECTION*/
#features{
	display: grid;
	grid-template-columns: 1fr 3fr 1fr;
	grid-template-rows: 1fr 4fr;
	grid-template-areas:
	". title ."
	". content .";
	align-items: center;
}
#feature-title {
	grid-area: title;
}
#feature-content {
	grid-area: content;
}
.feature-grid{
	display: grid;
	grid-template-columns: 1fr 3fr;
	grid-template-areas: "logo words";
	grid-gap: 5px;
	align-items: center;
}
.featureicon {
	grid-area: logo;
	box-sizing: border-box;
	padding: 20px;
	font-size: 40px;
}
.feature-words {
	grid-area: words;
	text-align: left;
}

#how-it-works h2 {
	padding: 1em;
}
/*PRODUCTS*/

#products{
	display: grid;
	grid-template-columns: 1fr 3fr 1fr;
	grid-template-rows: 1fr 4fr;
	grid-template-areas:
	". title2 ."
	". content2 .";
	align-items: center;
	
}
#product-title {
	grid-area: title2;
}

#product-grid{
	grid-area: content2;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap: 5px;
	align-items: center;
}
.product-item{
	border: 0.1em solid black;
	border-radius: 5px;
	background: #ffdecf;
	padding-bottom: 30px;

}
.product-item h3 {
	background: #d6a28d;
	margin:0;
	padding: 1em;
}

#products ul {
	padding: 0;
}
#products ul li {
	list-style: none;
	text-align: center;
}

.price {
	font-weight: 700;
}


footer {
	background: #b88dd6;
	padding: 20px;
}

#email {
  background: #d6a28d;
  border: 0.1em solid #ffdecf;
  font-size: 1.5em;
  padding: 5px;
}
#submit{
  text-transform: uppercase;
  text-decoration: none;
  color: black;
  background: #d6a28d;
  font-size: 1em;
  padding: 10px;
  border: 0.1em solid #ffdecf;
  border-radius: 3px;
}
#submit:hover{
  opacity: 0.5;
}

/*CHOCOLATE SHADOWS!*/
#nav-bar, .btn, .product-item, #email, #submit {
	box-shadow: 2px 2px 3px #5c3317 ;
}


@media (max-width: 800px) {
	#products{
	display: grid;
	grid-template-columns: 1fr 3fr 1fr;
	grid-template-rows: 1fr 4fr;
	grid-template-areas:
	". title3 ."
	". content3 .";
	align-items: center;
}

#product-title {
	grid-area: title3;

}

#product-grid{
	grid-area: content3;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: repeat(3, 1 fr);
	grid-gap: 5px;
}

}

@media (max-width: 700px) {



.logo {
	position: fixed;
	top: 0;
	
}
nav ul {
	max-height: 0px;
}

.showing {
	max-height: 20em;
}

	nav ul li {
		box-sizing: border-box;
		width: 100%;
		padding: 2em 0;
		text-align: center;
	}
		.menu-icon {
		display: block;

	}
	#title-showcase {
		height: 100px;
	}
	#title-showcase h1 {
		font-size: 3em;
	}
	
	#title-showcase .btn {
		font-size: 0.8em;
	}
}

@media (max-width: 600px) {
	iframe {
	width: 100vw;
	height: 56.25vw;
}
}
@media (max-width: 500px){
		
		#title-showcase {
		height: 50px;
	}
	#title-showcase h1 {
		font-size: 2em;
	}
	
	#title-showcase .btn {
		font-size: 0.6em;
	}



}
              
            
!

JS

              
                $(document).ready(function() {
	$(".menu-icon").on("click", function(){
		$("nav ul").toggleClass("showing");	
	});
	$("nav ul li").on("click", function(){
		if($(".menu-icon").css("display")=="block") {
		$("nav ul").toggleClass("showing");

	}
});
});
              
            
!
999px

Console