octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <!doctype html>
<html lang="en">
  
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Responsive Design</title>
</head>
  
<body>
  
  <header class="main-header">
    <img src="http://placehold.it/400x250" alt="Image" />
    
    <nav>
      <ul>
          <li class="active"><a href="#">Home</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Clients</a></li>
          <li><a href="#">Contact Us</a></li>
      </ul>
    </nav>  
  </header>
  
  <div class="content-wrap">
    
    <div class="left-contents">
      
    <div class="content-module">
      <article>
        <h2><a href="#">Sample Blog Title</a></h2>
        <p class="meta-data">Post published by Steven</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
      </article>
    </div><!-- content end -->
    
    <div class="content-module">
      <article>
        <h2><a href="#">Sample Blog Title</a></h2>
        <p class="meta-data">Post published by Steven</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
      </article>
    </div><!-- content end -->
      
    </div><!-- left contents end -->
  
  <aside class="sidebar-module">
    <article>
      <h2>Top Sidebar</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</p>  
    </article>
  </aside>
  
  <aside class="sidebar-module">
    <article>
      <h2>Middle Sidebar</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</p>  
    </article>
  </aside>
  
  <aside class="sidebar-module">
    <article>
      <h2>Bottom Sidebar</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</p>  
    </article>
  </aside>
    
        
  </div><!-- main-content end -->
  
  <div class="clear"></div>
  
  <footer>
    <p>Copyright &copy; 2013. <a href="#">Steven Watson</a></p>
  </footer>
  
</body>
</html>
            
          
!

CSS

            
              *, :after, :before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.clear {
  clear: both;
}

body {
  background: url('http://subtlepatterns.com/patterns/witewall_3.png');
  font-size: 87.5%; /* Base font is 14px */
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5em;
  text-align: left;
  margin: 0 auto;
  width: 70%;
  clear: both;
}

a {
  text-decoration: none;
}

a:link, a:visited {
  color: #666;
}

a:hover, a:active {
  color: #cf5c3f;
}

.main-header img {
  height: auto;
  margin: 2% 0;
}

.main-header nav {
  background-color: #666;
  height: 40px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}

.main-header nav ul {
  list-style: none;
  margin: 0 auto;
}

.main-header nav ul li {
  float: left;
  display: inline;
}

.main-header nav a:link, .main-header nav a:visited {
  color: #fff;
  display: inline-block;
  padding: 10px 25px;
  height: 40px;
}

.main-header nav a:hover, .main-header nav a:active, .main-header nav .active a:link, .main-header nav .active a:visited {
  background-color: #cf5c3f;
  text-shadow: none;
}

.content-wrap {
  margin: 2% 0;
  overflow: hidden;
}

.left-contents {
  float:left;
  width:70%;
}

.content-module {
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  background-color: #fff;
  padding: 3% 5%;
  margin: 0 0 2% 0;
}

.meta-data {
  font-style: italic;
  color: #999;
  font-size: 85%;
}

.sidebar-module {
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  padding: 2% 3%;
  background: #fff;
  width: 28%;
  margin: 0 0 2% 2%;
  float: left;
}

footer {
  background: #666;
  border-top: 5px solid #CF5C3F;
  height: 40px;
}

footer p {
  width: 92%;
  margin: 6px auto;
  color: #fff;
}
            
          
!

JS

            
              
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console