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

              
                <div class="mobile-first-wrapper">
  <header class="mobile-style-header">
    <a class="btn btn-default" href="#">MENU</a>
    Cool App-style Layout
    <a class="btn btn-default" href="#">HOME</a>
  </header>
<div class="content-body">
  
  <section class="my-hero">
    <div style="background:rgba(0,0,0,.75); padding:20px; width:80%;">
      <h1 class="cta-heading">You want great tutorials! We want pizza!</h1>
      <p class="cta-copy">
      Help a coder out. Just 72&#65504; per month is all it takes.
      </p>
    </div>
    <form class="donate">
      <input type="text" placeholder="Your email, please">
      <input type="submit" value="Start Learning">
    </form>
  </section>
  <div class="main-content-wrapper">
    
    <section class="box-content">
      <h1>What is Lorem Ipsum?</h1>
      <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer 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. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
      <h2>Why do we use it?</h2>
      <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. 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>
      <h2>Where does it come from?</h2>
      <p>Contrary to popular belief, 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. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (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>
      <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
      <h2>Where can I get some?</h2>
      <p>There are many 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>
      <h2>Where does it come from?</h2>
      <p>Contrary to popular belief, 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. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (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>
      <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
      <h2>Where can I get some?</h2>
      <p>There are many 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>
    </section>
    <section class="sidebar">
      <h2>Here Be the Sidebar</h2>
    </section>
  </div>
  </div>
  <footer class="mobile-icons">
    <a class="icon-container"><i class="fa fa-map-marker" aria-hidden="true"></i><br />Map
    </a>
    <a class="icon-container"><i class="fa fa-envelope" aria-hidden="true"></i><br />Email</a>
    <a class="icon-container"><i class="fa fa-phone" aria-hidden="true"></i><br />Call
    </a>
    <a class="icon-container last"><i class="fa fa-comments-o" aria-hidden="true"></i><br />Text</a>
  </footer>
</div>
              
            
!

CSS

              
                .mobile-first-wrapper{
  display:flex;
  flex-direction:column;
}
.mobile-style-header{
  text-align:center;
  text-transform:uppercase;
  color:#fff;
  font-weight:bold;
  background:goldenrod;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 20px;
}
.my-hero{
  background:url(https://designoneweb.com/wp-content/uploads/2016/09/Desktop-Mobile-Tablet.jpg)  center right;
  background-size:cover;
  height:calc(100vh - 54px);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:0 5%;
}
.my-hero p{
  font-size:22px;
}
.my-hero img{
  opacity:0.5;
}
.my-hero h1{
  margin-top:0;
}
.my-hero h1, .my-hero p{
  text-shadow: 2px 2px 10px #000000;
  font-weight:900;
  color:#fff;
}
.donate{
  display:flex;
  width:80%
}
.donate input[type=text]{
  flex:3;
  padding:5px 10px;
  color:#cc0000;
}
.donate input[type=submit]{
  flex:1;
  background:#cc0000;
  border:none;
  padding:5px 10px;
}
.content-body{
  flex:1;
}
.main-content-wrapper{
  font-size:22px;
  padding:10px 15%;
  display:flex;
}
.box-content{
  flex:3;
}
.sidebar{
  flex:1;
  background:#f1f1f1;
  padding:0 10px;
  min-width:300px;
}
.mobile-icons{
  background:goldenrod;
  display:flex;
  flex-direction:row;
}
.icon-container{
  flex-grow:1;
  text-align:center;
  border-right:1px solid #666;
  padding:10px 0px;
  color:#fff;
  font-weight:bold;
}
.last{
  border:none;
}

@media (min-width: 961px){
  .mobile-icons{
    
  }
  .box-content{
    margin-right:20px;
  }
}
@media (max-width: 960px){
  .content-body{
    overflow-y:scroll;
  }
    .main-content-wrapper{
    padding:10px 5%;
    
    flex-direction:column;
  }
  .mobile-first-wrapper{
    height:100vh;
  }
  .my-hero{
    height:calc(100vh - 114px);
  }
}
@media (max-width: 720px){
  .donate{
    flex-direction:column;
  }
  .donate input[type=submit], .donate input[type=text]{
    padding:15px;
    text-align: center;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console