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

              
                <div class="container">
<div class="header">
  <div class="logo">
    <img width="100" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/7635/logo-mobile.png" />
  </div>
  <div class="navigation">
    <ul class="main-nav">
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Services</a></li>
      <li><a href="#">Contact</a></li>      
    </ul>
  </div>
 </div>
  <div class="content">
    <h1>Our Fixed width site</h1>
    
  <p>  In 2009 Ethan Marcotte wrote the first article on flexible grids. Even after 5 years it's still the same rules.</p> 

  <p>If you want to see where it all began you can relive that famous article, but I think you should just keep reading this article to get the information you need to start building responsively seeing as you're already here. </p>

    <h2> First, what we are NOT going to do</h2>

  <p>I'm not going to deep dive into all the tips and tricks to make sure your responsive design is perfect in every scenario... that's why I've built you an entire site to try and help support you with those areas. </p>

## Second, what we ARE going to do

     <p> I'm going to cover the basic theory of responsive design.</p>



    <h2>GETTING FLEXY</h2>

 <p>   To illustrate the fundamentals we're going to start with a typical run-of-the-mill website. The most basic websites are usually made up from the following ingredients.</p>
<ul>
<li>Header
  </li><li>Logo
  </li><li>Navigation
  </li><li>Body
  </li><li>Content
  </li><li>Secondary Navigation
  </li><li>Footer
  </li><li>Copyright
  </li><li>Social Links</li>
    <ul>
  </div>
  <div class="sidebar">
    <h2>Related Contents</h2>
    <ul>
<li>Header
  </li><li>Logo
  </li><li>Navigation
  </li><li>Body
  </li><li>Content
  </li><li>Secondary Navigation
  </li><li>Footer
  </li><li>Copyright
  </li><li>Social Links</li>
    <ul>
  </div>
  <div class="footer">
    <div class="copyright">
      Copyright blah blah
    </div>
    <div class="social">
      <ul>
        <li><a href="https://www.twitter.com/reswebdes">@reswebdes</a></li>
        <li><a href="https://www.facebook.com/responsivewebdesigns">FB/ResponisveWebDesigns</a></li>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $red: #8e352e;
$darkred: #c84c44;
$altred: #a53d36;

body {
  font-size: 16px;
  background-color: $darkred;
}

.container {
     width: 960px;
     margin: 0 auto;
}

.header {
  width: 960px; 
  background-color: $darkred;
  float:left;
  height: 100px;
}

.logo {
  float: left;
  width: 100px;
  padding: 10px;
}

.navigation {
 float:left; 
  width: 840px;
}

.main-nav {
   width: 800px;
}

.main-nav li {
  float:left;
  list-style-type: none;
  width: 198px;
  text-align: center;
  border-left:1px solid $altred;
  border-right:1px solid $altred;
}

.main-nav li a {
  line-height: 32px; 
  text-decoration: none;
  background-color: $red;
  width: 198px;
  display: block;
  color: white;
}

.main-nav li a:hover {
  background-color: $darkred;
}

.content {
 padding: 30px;
 width: 600px;
 float:left;
 background: #fff;
}

.sidebar {
 width: 280px;
 float:left;
 padding: 10px;
 background-color: $altred;
}

.footer {
  float:left;
  width: 900px;
  background-color:$red;
  padding: 30px;
  color: white;
  a {
    color: white;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console