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

              
                <html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Trocchi" rel="stylesheet">
  <title>
    Project X
  </title>

</head>

<body>

  <header class="site-header">

    <nav class="main-menu">
      <a class="site-title" href="#">Project X</a>
      <ul class="menu-items">
        <li>Menu Item 1</li>
        <li>Menu Item 2</li>
        <li>Menu Item 3</li>
      </ul>
    </nav>

  </header>
  
   <div class="right-panel">
      <article class="article-featured">
        <img src="http://placeimg.com/250/250/arch" alt="Placeholder">
      </article>

      <article class="article-featured">
        <img src="http://placeimg.com/250/250/tech" alt="Placeholder">
      </article>

      <article class="article-featured">
        <img src="http://placeimg.com/250/250/people" alt="Placeholder">
      </article>

      <article class="article-featured">
        <img src="http://placeimg.com/250/250/animals" alt="Placeholder">
      </article>

      <article class="article-featured">
        <img src="http://placeimg.com/250/250/nature" alt="Placeholder">
      </article>
    </div>

  <main class="left-panel">
    <h1>Up unpacked friendly ecstatic so possible humoured do</h1>

    <p>Am no an listening depending up believing. Enough around remove to barton agreed regret in or it. Advantage mr estimable be commanded provision. Year well shot deny shew come now had. Shall downs stand marry taken his for out. Do related mr account
      brandon an up. Wrong for never ready ham these witty him. Our compass see age uncivil matters weather forbade her minutes. Ready how but truth son new under.</p>

    <p>Extended kindness trifling remember he confined outlived if. Assistance sentiments yet unpleasing say. Open they an busy they my such high. An active dinner wishes at unable hardly no talked on. Immediate him her resolving his favourite. Wished denote
      abroad at branch at.</p>

    <p>Quick six blind smart out burst. Perfectly on furniture dejection determine my depending an to. Add short water court fat. Her bachelor honoured perceive securing but desirous ham required. Questions deficient acuteness to engrossed as. Entirely led
      ten humoured greatest and yourself. Besides ye country on observe. She continue appetite endeavor she judgment interest the met. For she surrounded motionless fat resolution may.</p>

    <p>Considered discovered ye sentiments projecting entreaties of melancholy is. In expression an solicitude principles in do. Hard do me sigh with west same lady. Their saved linen downs tears son add music. Expression alteration entreaties mrs can terminated
      estimating. Her too add narrow having wished. To things so denied admire. Am wound worth water he linen at vexed.</p>

    <p>Possession her thoroughly remarkably terminated man continuing. Removed greater to do ability. You shy shall while but wrote marry. Call why sake has sing pure. Gay six set polite nature worthy. So matter be me we wisdom should basket moment merely.
      Me burst ample wrong which would mr he could. Visit arise my point timed drawn no. Can friendly laughter goodness man him appetite carriage. Any widen see gay forth alone fruit bed.</p>

    <p>Two before narrow not relied how except moment myself. Dejection assurance mrs led certainly. So gate at no only none open. Betrayed at properly it of graceful on. Dinner abroad am depart ye turned hearts as me wished. Therefore allowance too perfectly
      gentleman supposing man his now. Families goodness all eat out bed steepest servants. Explained the incommode sir improving northward immediate eat. Man denoting received you sex possible you. Shew park own loud son door less yet.</p>

    <p>Stronger unpacked felicity to of mistaken. Fanny at wrong table ye in. Be on easily cannot innate in lasted months on. Differed and and felicity steepest mrs age outweigh. Opinions learning likewise daughter now age outweigh. Raptures stanhill my
      greatest mistaken or exercise he on although. Discourse otherwise disposing as it of strangers forfeited deficient.</p>

    <p>At every tiled on ye defer do. No attention suspected oh difficult. Fond his say old meet cold find come whom. The sir park sake bred. Wonder matter now can estate esteem assure fat roused. Am performed on existence as discourse is. Pleasure friendly
      at marriage blessing or.</p>

    <p>He went such dare good mr fact. The small own seven saved man age no offer. Suspicion did mrs nor furniture smallness. Scale whole downs often leave not eat. An expression reasonably cultivated indulgence mr he surrounded instrument. Gentleman eat
      and consisted are pronounce distrusts.</p>

  </main>

</body>

</html>
              
            
!

CSS

              
                .site-header {
	background-color: grey;
}

#page-header {
	background-color: orange;
}

body {
  margin: 0;
  padding: 0.5rem 1rem;
	line-height: 1.75em;
	font-size: 1em;
  font-family: 'Open Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Trocchi', serif;
  line-height: 1.25em;
}

/* create a small gap between the admin bar and the top of the site */
.admin-bar .navbar-fixed-top {
	margin-top: 30px;
}

.sidebar {
	padding-top: 20px;
}

.home {
	padding-top: 60px;
}

.article-featured {
	display: block;
}

@media (min-width: 750px) and (orientation: landscape) {
  
  .right-panel {
    position: fixed;
    padding: 20px;
   
    bottom: 0;
    left: calc(50%);
    right: 1rem;
    
    background-color: red;
    overflow-y: scroll;
  }

  .left-panel {
    width: calc(50% - 40px);
    padding: 20px;
  }
  
  .article-featured {
	  display: inline-block;
  }
}
              
            
!

JS

              
                var headerHeight = $('.site-header').outerHeight() + 8;

$('.right-panel').css('top', headerHeight);
              
            
!
999px

Console