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 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

              
                <head>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class='header'>
<button class='menu-button'></button></div>
<div class='menu-container'>
	<div class='menu fontawesome-home'><br />Home</div>
	<div class='menu fontawesome-cog'><br />Settings</div>
	<div class='menu fontawesome-comments'><br />Blog</div>
	<div class='menu fontawesome-heart'><br />My Favorites</div>
	<div class='menu fontawesome-envelope'><br />Contact Us</div>
	<div class='menu fontawesome-bullhorn'><br />New!<br/><img src='http://placehold.it/350x350'/></div>
	<div class='menu fontawesome-upload-alt'><br />Upload</div>
	<div class='menu fontawesome-download-alt'><br />Download</div>
	<div class='menu fontawesome-calendar'><br />My Calendar</div>
	<div class='menu fontawesome-folder-open'><br />My Files</div>
	<div class='menu fontawesome-inbox'><br />Inbox</div>
</div>
<div class="container">
  <h1>Easy Masonry-Style Responsive Grid & Menu(CSS Only)</h1>
  <h2></h2>
  <p>Resize Me</p>
  <div class='grid'>
  <div class="block">
	<h3>Lorem Ipsum is simply dummy text</h3>
	<br />
	<h3><img src='http://placehold.it/350x350'/></h3>
	<br><p>
	Of the printing and typesetting industry.  Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
	</p><br />
	<button>read more</button>
	<br></div>
	<div class="block"><h3>when an unknown printer</h3>
	<p>Took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
	</p><br/>
	<h3><img src='http://placehold.it/350x350'/></h3>
	<p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages
	</p><br />
	<button>read more</button>
	<br></div>
	<div class="block">
	<h3>And more recently</h3>
	<br />
	<h3><img src='http://placehold.it/350x350'/></h3>
	<p>software like Aldus PageMaker including versions of Lorem Ipsum.
	</p><br />
	<button>read more</button>
	<br></div>
	<div class="block">
	<h3>Contrary to popular belief</h3>
	<p>Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.
	</p><br/>
	<button>read more</button>
	<br /></div>
	<div class="block"><h3>English.</h3>
	<p>Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div>
	<div class="block"><h3>The standard chunk</h3>
	<ul>
	<li>Of Lorem Ipsum used since the 1500s is reproduced below for those interested.</li>
	<li>Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero</li>
	<li>Also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham</li>
	<br></div>
	<div class="block">
	<h3>Us "Bonorum et Malorum" </h3>
	<p>(The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
	<br></div>
	<div class="block"><h3>Desktop publishing</h3>
	<p>packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
	<br></div>
	<div class="block"><h3>All the Lorem Ipsum</h3> 
	<p>Generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
	<br></div>
	<div class="block">
	<h3>There are many</h3> 
	<p>Variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
	</div>
	<div class="block"><h3><img src='http://placehold.it/350x350'/></h3><br></div>
	<div class="block"><h3><img src='http://placehold.it/350x350'/></h3><br></div>
	<div class="block"><h3>when an unknown printer</h3>
	<p>Took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
	</p><br/>
	<h3><img src='http://placehold.it/350x350'/></h3>
	<p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages<br></div>
	<div class="block"><h3><img src='http://placehold.it/350x350'/></h3><br></div>
	</div>
</div>
</body>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Ruluko);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);

/* fontawesome */
[class*="fontawesome-"]:before {
  font-family: 'FontAwesome', sans-serif;
  font-size:2em;
  text-align:center;
  
}

html {
  font-size: 100%;
  box-sizing: border-box;
}
  
body {
  background:#000;
  color: #faf0e0;
  font-family: 'Ruluko', sans-serif;
  width: 100%;
  margin: 0;
}

h1 {
  font-size: 2.5em;
  padding-top:4em;
}

h2 {
  font-size: 1.75em;
}
h3{
	font-size:1.2em;
	text-align:center;
	line-height:2em;
	text-transform:uppercase;
}
img{
	max-width:100%;
	display:inline-block;
}
p {
  padding: 5px;
  margin-bottom: 1em;
}
.block > button{
	background:#F14C38;
	width:30%;
	padding:1em;
	border-radius:2%;
	border:1px solid transparent;
	margin-left:35%;
	margin-top:5%;
	margin-bottom:5%;
	color:#FFF;
	 box-shadow: inset 0 0 0 5px #FFF;
	 transition: all 0.6s ease 0s;
}
button:hover{
	background:#FFF;
	box-shadow: inset 0 0 0 5px #F14C38;
	color:#F14C38;
	
}
h2:after {
  content: "Viewport < 768";
}
@media (min-width: 48em) {
h2:after {
    content: 'Viewport > 768 && Viewport < 1280';
  }
}
@media (min-width: 80em) {
  h2:after {
    content: 'Viewport >= 1280';
  }
}

.header{
	position:fixed;
	background:#FFF; 
	top:0; 
	width:100%;
	padding:.5em; 
	z-index:3; 
	-moz-box-shadow:    3px 3px 5px 6px #000;
    -webkit-box-shadow: 3px 3px 5px 6px #000;
    box-shadow:         3px 3px 5px 6px #000;
}
.menu-button{
  top:1em;
  z-index:4;
  background:#F14C38;
  width:8em;
  padding:1em;
  font-size:1em;
  border-radius:2%;
  border:1px solid transparent;
  color:#FFF;
  box-shadow: inset 0 0 0 5px #FFF;
  transition: all 0.6s ease 0s;
  transition-duration: 0.3s;
}
.menu-button:after{
  content:'Menu';
}
.menu-button.menuAfter:after{
	content:'Close';
}
.menu-container{
  z-index:2;
  max-width: 100%;
  padding-top:2em;
  margin-left:1em;
  margin-right:1em;
  padding-bottom:200px;
  top:5em;
  background-color:rgba(0,0,0,0.85);
  position:absolute;
  column-count: 3;
  column-gap: 1em;
  box-sizing: border-box;
}

.menu{
		box-sizing: border-box;
    display:inline-block;
		padding:2em; 
	  color:#fff;
		background:#F14C38;
		border:1px solid transparent;
		box-shadow: inset 0 0 0 5px #FFF;
		transition: all 0.6s ease 0s;
		margin: 0 0 1em;
		font-size:2em;
		text-align:center;
		width:100%; 
  
}
.menu:hover{	
	background:#FFF;
	box-shadow: inset 0 0 0 5px #F14C38;
	color:#F14C38;
}
.container {
  *zoom: 1;
  max-width:100%;
  padding-left: 1em;
  padding-right: 1em;
  margin-left: auto;
  margin-right: auto;
}
.container:after {
  content: "";
}
.block {
  width: 100%; 
  background:#F4F1E0;
  padding: .5em;
  display: inline-block;
  margin: 0 0 1em;
  font-size:1em;
  box-sizing: border-box;
}
	
.grid >.block{
	transition: all 0.7s easein 0.7s;
}

.grid{ 
    column-count: 3;
    column-gap: 1em;
	  color:#144955;
}
@media (max-width: 40em){
.grid, .menu-container {
    column-count: 1;
  }
   .block:after{
		content: "We're all 100% width";
	}
}
@media (min-width:40.1em){
	.grid, .menu-container{
		column-count: 2;
	}
	.block:after{
		content:"We're two fat columns wide!";
	}	
}
@media (min-width: 61em) {
  .grid, .menu-container {
	column-count: 3;
  }
  .block:after {
    content: "We're three narrow columns wide!";
  }
}
@media (min-width: 80em) {
  .grid, .menu-container {
     column-count: 3;
  }
  .block:after {
    content: "We're three fat columns wide!";
  }
}

              
            
!

JS

              
                /*The only JS used is for menu functionality*/

$(document).ready(function(){
	$('.menu-container').hide();
	$('.menu-button').click(function(){
		$('.menu-container').toggle('slide',{direction:'left'}, 'slow');
		$('.menu-button').toggleClass('menuAfter');
	});
});

/*Life's Not Complete Without Art (Expand Your Editor > ASCII Is Not Responsive ;)


 													.::                       .
                               :::::::....                `::
                          .::::::::::::::::::..::::::::::::::.
                   .:  .::::::::::::::::::::::::::::::::::::::::
                  ::::::::::::::::::::::::::::::::::::::::::::::::
                  `:::::::::::::::``::::::::::: `::::::::::::::::::
                   ::::::::::'zc$$$b`:',cc,`:::' :''``,c=`:::::::::::'
                  ::::::::'::: $$$$$$$$$$$$$c,,u,zd$$$$$c,',zc,`::::'
                  ::::::'z$ccd$$$$$P" . "$$$$$$$$$$$$.. `?$$$$".::::
                 :::::::dP?$$$$$$$" d$$$$$$$$$$$$$$$$$$$b."$$L,`:::
               :::::::::.::$$$$$$ z$$$$$$$$$$$$$$$$$$$$$$$c"$$$$,::..
                `'::::::'`.$$$$$$$"$F<$"3$$$$$$$$$$$$$$?$$?$$P:..:''
                  `:::::`$$$$$$$"?   .. ?"$$$$$$$$$$r`" " <"3$c`:
                    :::::."?:`$$F    d$$.<$$$$$$$$P    4$c $"""/
                     :::::::::J$ .,,$$$$P $$$$$$$$>   ,$$$F  ::::
                  `:::'```'',d$$c`?$$$$P"J$$$$$$$$."$$$$$P db`''
                      f,r4b4$$$$$c ,`"".-$$$$$$$$$$c """" c$$$ b
                      F ,$"d$$$$$$$$c$bd$$$$$$$ $$$$b$bJ$L$$$P P
                            "?$$$$$$$$$$$$$$$P??$$$$$$$$$$$P" '
                               `"""???$PFFF""    """"""""
                            4$$$$$$cdccccc$$$bcc$$$$$$$$$$$$bc
                           d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$bc
                          $$$$$$$$$$$??????$$$FF?????P 3$$$$$$$$$$c.
                         d$$$$$$$$P':::::::`?'::::::::   "?$$$$$$$$$$c.
                        4$$$$$P  $ :::::::::::::::::::      "?$$$$$$$$$c
                        $$$$$P  `$.::::::::::::::::::          `"".$$$$$c
                      .$$$$$$'   `$-`::::::::::::::'             c$$$$$$$
                     z$$$$$$'      ::::::::::::::::            .$$$$$$$$
                   .d$$$$$$'       `:::::::::::::::           .$$$$$$$F'
                  d$$$$$$$'         `::::::::::::::          ,$$$$$$P"
                .$$$$$$$F            ::::::::::::::: 3c,  . 4$$$$P"'
               z$$$$$$$"           :::::::::::::: ==$$$$$c % "?"
              z$$$$$$"           .::::::::::::::::..:3$$$$P L
              `?$$$"            ::::::::::::::::::::.?::: . $
   .,,,,TMR$L ? ""             :::::::::::::::::::::::::::.c%
 :$$ ?=?P$$$%                 ::::::::::::::::::::::::::::
:"???$%==""  "d               :::::::::::::::::::::::::::::    .
                             `:::::::::::::::::::::::::::::::::::
                              ::::::::::::::::::::::::::::::::::
                         :   :::::::::::::::::````,,,,TMR`''''`
                         :::::::::::'zc,,,,,cd$$ `???""""
                         `::::::::',d$$$$$$$$$$$      =
                           `````` $$$$$$$$$$$$$$ $$$$$c$F
                                  `$$$$$$$$$$$$$ $$$$$$F
                                   `$$$$$$$$$$$F<$$$$$$
                                    `$$$$$$$$$$'$$$$$$F
                                     4$$$$$$$$F<$$$$$P
                                    z$$$$$$$$F $$$$$P
                                   c$$$$$$$$$ J$$$$$F
                                 .$$$$$$$$$$"z$$$$$$
                                 $$$$$$$$$P c$$$$$$$
                                $$$$$$$$$" 4$$$$$$$F
                               d$$$$$$$$"  $$$$$$$$'
                              .$$$$$$$P    4$$$$$$$
                              J$$$$$$"      $$$$$$F
                              $$$$$P        ?$$$$$
                             d$$$$F         <$$$$F
                             $$$P"           $$$P
                            J$$P            <$$$'
                           .$$P             $$$$
                          .$$$             `$$$L
                         z$$$F            / "$$$
                        $$$$%/           ( ;. "?.
                       ;"?"">            ``  `.  \
                       \.- `                   `--'


|Betty Boop|
*/
              
            
!
999px

Console