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

              
                <!-- css grid layout -->
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>Some Title</title>
</head>

<body>

	<main>

		<header class="banner">
			<h1>As pretty as a picture</h1>
			<article>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
				<a href="https://unsplash.com/s/photos/colorful-nature?orientation=squarish" target="_blank">Explore colorful nature</a>
			</article>
		</header>

		<div class="container">

			<section class="header-nav">
				<nav>
					<ul>
						<li><a href="#">Home</a></li>
						<li><a href="#">About</a></li>
						<li><a href="#">Portfolio</a></li>
						<li><a href="#">Contact</a></li>
					</ul>
				</nav>
			</section>

			<div>

				<h2>Colorful Nature</h2>

			</div>

			<div class="grid">

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1500964757637-c85e8a162699" alt="composición de un paisaje"></div>

				<div class="grid-item twobytwo"><img src="https://images.unsplash.com/photo-1532274402911-5a369e4c4bb5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" alt="guatemala travel"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1497294815431-9365093b7331?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" alt="creative landscape art photography"></div>

				<div class="grid-item onebytwo"><img src="https://images.unsplash.com/photo-1475113548554-5a36f1f523d6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=80" alt="goodmorning pic for instagram"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1585059651800-72a1a963adaa?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" alt="tree scenery"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1583611352296-1e7f6d767659?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80" alt="autumn soul"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1559065188-2537766d864b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" alt="drei zinnen nature park"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1494459940152-1e911caa8cc5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=80" alt="sunset beach"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1503122703469-3dbbe39d0d1c?ixlib=rb-1.2.1&auto=format&fit=crop&w=675&q=80" alt="morning landscape"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1513875528452-39400945934d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=967&q=80" alt"sunset on lake tahoe painting"></div>

				<div class="grid-item twobyone"><img src="https://images.unsplash.com/photo-1559478099-a2296110c47b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" alt="BTS"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1520179237290-429836c06b1b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=700&q=80" alt="sometimes we don't need advice"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1507097672537-2b0effc54687?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=955&q=80" alt="tree in sunset view"></div>

				<div class="grid-item twobytwo"><img src="https://images.unsplash.com/photo-1503327431567-3ab5e6e79140?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1064&q=80" alt="Photo by Mado El Khouly on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1542272201-b1ca555f8505?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=3774&q=80" alt="Photo by Szabo Viktor on Unsplash"></div>

				<div class="grid-item onebytwo"><img src="https://images.unsplash.com/photo-1533693515986-ba971d5c241c?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2071&q=80" alt="Photo by Raychan on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1571247249406-5045a0ae6bba?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1015&q=80" alt="Photo by Dave Hoefler on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1542549596-c5ea2b9f69fc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1065&q=80" alt="Photo by Benjamin Voros on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1579033461380-adb47c3eb938?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1064&q=80" alt="Photo by Benjamin Suter on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1597697662733-0e9e0f4db9a7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=987&q=80" alt="Photo by Mario Mendez on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1475924156734-496f6cac6ec1?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2070&q=80" alt="Photo by Quino Al on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1565786423298-4bdca4334241?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=987&q=80" alt="Photo by Dave Hoefler on Unsplash"></div>

				<div class="grid-item twobyone"><img src="https://images.unsplash.com/photo-1498081959737-f3ba1af08103?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=987&q=80" alt="Photo by Adam Birkett on Unsplash"></div>

				<div class="grid-item"><img src="https://images.unsplash.com/photo-1568724196243-755adeda7891?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=987&q=80" alt="Photo by Dave Hoefler on Unsplash"></div>

			</div>

		</div>

	</main>

	<footer>Created by Raya Bergin LBCC Fall2021 COSW20 &copy; 05Oct2021</footer>

</body>

</html>
              
            
!

CSS

              
                * {
	/* Outline to view layout on screen while styling | Remove after styling */
	/* 	outline: 0.0625rem dashed #000; */

	/* include rules for specific web page below this line */
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}

html {
	box-sizing: border-box;
	font-size: 100%;
}
*,
*:before,
*:after {
	box-sizing: inherit;
}

@import url("https://fonts.googleapis.com/css2?family=Crimson+Text&display=swap");
/* font-family: 'Crimson Text', serif; */
@import url("https://fonts.googleapis.com/css2?family=Work+Sans&display=swap");
/* font-family: 'Work Sans', sans-serif; */

body {
	width: 100%;
	max-width: 75em;
	margin: 0 auto;
	background-color: #f0f8ff;
	font-family: "Work Sans", sans-serif;
	color: #333;
}

/* Begin HEADER */
.banner {
	/* photo(as background) by mymind on Unsplash */
	background: url(https://images.unsplash.com/photo-1604077350837-c7f82f28653f?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTV8fGNvbG9yfGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=900&q=60)
		center;
	background-size: cover;
	padding: 4em 2em;

	/* h1 grid style */
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
	align-items: center;
	color: #fff;
}
.banner h1 {
	font-family: "Crimson Text", serif;
	font-size: 4rem;
	padding-bottom: 0.5em;
}
.banner article p {
	font-size: 1.5rem;
}
.banner article a {
	padding: 1em;
	margin-top: 0.75em;
	text-transform: uppercase;
	background-color: #1db9c3;
	color: #fff;
	text-decoration: none;
	border-radius: 0.25em;
	text-align: center;
	display: inline-block;
	transition-property: all 0.5s;
}
.banner article a:hover {
	opacity: 0.85;
}
/* End HEADER */

/* Begin CONTAINER */
.container {
	padding: 2em;
	min-width: 25em;
}

/* Begin NAV BAR */
.header-nav {
	width: 100%;
}
nav {
	text-transform: uppercase;
}
nav ul {
	list-style: none;
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 2em;
	margin-left: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
nav ul li {
	flex: 1 1 auto;
	text-align: center;
}
nav ul li a {
	color: #333;
	text-decoration: none;
}
nav ul li a:hover {
	color: #1db9c3;
}
/* End NAV BAR */

h2 {
	font-family: "Crimson Text", serif;
	font-size: 3rem;
	color: #1db9c3;
	margin-bottom: 0.25em;
}

/* Begin GRID */
.grid {
	display: grid;
	grid-gap: 1.25em;
	grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
	grid-template-rows: repeat(5, minmax(10em, 1fr));
	grid-auto-flow: dense;
	justify-content: center;
}
.grid-item {
	background-color: #fff;
	justify-self: stretch;
}
/* force the images to stay in their cards */
.grid-item img {
	object-fit: cover;
	width: 100%;
	max-width: 100%;
	height: 100%;
	border-radius: 0.3em;
	box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 1);
}

/* Begin VARIED COMBO */
.twobytwo {
	grid-column: span 2;
	grid-row: span 2;
}
.onebytwo {
	grid-column: span 1;
	grid-row: span 2;
}
.twobyone {
	grid-column: span 2;
	grid-row: span 1;
}
/* End VARIED COMBO */
/* End GRID */
/* End CONTAINER */

/* FOOTER */
footer {
	background-color: #333;
	padding: 0.75em;
	color: white;
	text-align: center;
	font-size: 0.75rem;
}

              
            
!

JS

              
                
              
            
!
999px

Console