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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="wrapper">  
  <main>
    <div class="content">
      <h2>What is flexbox?</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam finibus sit amet nisl accumsan volutpat. Pellentesque hendrerit nisl erat, at blandit justo tincidunt sed. Nulla et purus sem. Morbi et hendrerit leo, non commodo velit. Nulla facilisi. Duis et dolor ac tellus maximus elementum. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>

      <p>Maecenas tincidunt mauris eu est aliquam, sed mattis est faucibus. Integer lectus augue, fringilla eu orci a, facilisis vehicula lorem. Donec quis elementum tellus. Nullam tempus bibendum ultricies. Nunc a pulvinar nisl. Morbi id leo vitae tellus maximus fermentum eget ac enim. Phasellus bibendum viverra justo efficitur eleifend. Cras condimentum sodales sollicitudin. Donec vel arcu convallis, dignissim neque quis, condimentum leo. Maecenas at condimentum diam. Nunc ornare ante eget faucibus malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum elementum dictum. Praesent dapibus quam eget tellus condimentum, laoreet suscipit tortor ultricies.<p>
      
      <img src="https://cdn.css-tricks.com/wp-content/uploads/2011/08/flexbox.png">
      
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam finibus sit amet nisl accumsan volutpat. Pellentesque hendrerit nisl erat, at blandit justo tincidunt sed. Nulla et purus sem. Morbi et hendrerit leo, non commodo velit. Nulla facilisi. Duis et dolor ac tellus maximus elementum. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>

      <p>Maecenas tincidunt mauris eu est aliquam, sed mattis est faucibus. Integer lectus augue, fringilla eu orci a, facilisis vehicula lorem. Donec quis elementum tellus. Nullam tempus bibendum ultricies. Nunc a pulvinar nisl. Morbi id leo vitae tellus maximus fermentum eget ac enim. Phasellus bibendum viverra justo efficitur eleifend. Cras condimentum sodales sollicitudin. Donec vel arcu convallis, dignissim neque quis, condimentum leo. Maecenas at condimentum diam. Nunc ornare ante eget faucibus malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum elementum dictum. Praesent dapibus quam eget tellus condimentum, laoreet suscipit tortor ultricies.<p>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam finibus sit amet nisl accumsan volutpat. Pellentesque hendrerit nisl erat, at blandit justo tincidunt sed. Nulla et purus sem. Morbi et hendrerit leo, non commodo velit. Nulla facilisi. Duis et dolor ac tellus maximus elementum. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>

      <p>Maecenas tincidunt mauris eu est aliquam, sed mattis est faucibus. Integer lectus augue, fringilla eu orci a, facilisis vehicula lorem. Donec quis elementum tellus. Nullam tempus bibendum ultricies. Nunc a pulvinar nisl. Morbi id leo vitae tellus maximus fermentum eget ac enim. Phasellus bibendum viverra justo efficitur eleifend. Cras condimentum sodales sollicitudin. Donec vel arcu convallis, dignissim neque quis, condimentum leo. Maecenas at condimentum diam. Nunc ornare ante eget faucibus malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum elementum dictum. Praesent dapibus quam eget tellus condimentum, laoreet suscipit tortor ultricies.<p>
    </div>
    <aside>
      <ul>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
        <li>Lorem Ipsum Dolor Sit Amet</li>
      </ul>
    </aside>  
  </main>
</div>
              
            
!

CSS

              
                *
  margin: 0
  padding: 0
  box-sizing: border-box
html, body
  height: 100%
  font 15px sans-serif
  color #222

.wrapper
  height: 100%
  width: 100%
  display: flex
  flex-direction: column
  background: white

header
  flex: 0 0 50px
  padding: 1rem
  background: #BADA55
  
main
  flex 1 1 auto
  display: flex
  flex-wrap wrap

.content, aside
  padding: 1rem
  max-height: 100%
  overflow-y: scroll

.content
  flex 1 1 80%
  width: 80%
  background: white
  p
    margin-bottom: 1rem
  img
    margin: 1rem
    max-width: 100%

aside
  flex 1 1 auto
  min-width: 150px

  ul
    list-style: none
    -webkit-padding-start: 0px;
  li
    display: block
    padding: 1rem
    background: #EEE
    border-bottom: 1px solid #CCC
    transition: background .5s ease
  li:hover
    background: tomato
    color: black
              
            
!

JS

              
                
              
            
!
999px

Console