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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <ul class="menu">
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt deserunt minima praesentium blanditiis, ipsum dicta quam laborum esse magnam nemo unde consequatur autem mollitia consequuntur quaerat vel quis quos error.</p>
    </section>
  </li>
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolorum neque nemo, laborum tenetur suscipit veritatis a. Accusantium ipsam sequi consequatur? Vel inventore, tempora omnis praesentium fugit incidunt iure dicta corporis.</p>
    </section>
  </li>
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis recusandae possimus natus eaque doloremque eligendi expedita sequi saepe enim ipsam. Quasi reiciendis laudantium in dolor. Sint quam, officiis consequuntur ratione.</p>
    </section>
  </li>
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam nemo, ipsam, maxime blanditiis autem culpa esse praesentium mollitia beatae voluptatibus architecto! Quaerat dolore aut illum, quia voluptate obcaecati consequatur quod.</p>
    </section>
  </li>
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam veniam assumenda magni eos sapiente aspernatur illum, ad error quas repudiandae nam tempora sed beatae facilis neque similique velit aliquam suscipit.</p>
    </section>
  </li>
  <li class="menu-item">
    <section>
      <header>
        <h1>Item Name</h1>
        <span class="spacer"></span>
        <span class="price">$9.99</span>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis, nam tenetur aliquid beatae asperiores accusamus magni. Officia illo fuga ducimus eaque alias, aliquid nostrum odit, eos voluptates vel reprehenderit, natus.</p>
    </section>
  </li>
</div>
            
          
!

CSS

            
              @use postcss-nested;

* {
  box-sizing: border-box;
}

.menu {
  display: flex;
  list-style-type: none;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 auto;
  max-width: 960px;
  height: 100%;

  .menu-item {
    display: flex;
    width: 50%;
    list-style-type: none;
    padding: 0 1rem;
    margin: 0 0 1rem;
    
    section {
      display: flex;
      flex-direction: column;
      flex: 1;
      
      header {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        
        .spacer {
          content: '';
          width: 100%;
          height: 1px;
          margin: 0 .5rem;
          border-bottom: 1px dashed black;
          flex: 1;
        }
  
        h1 {
          margin: 0;
          font-size: 1rem;
        }
      }
    }
  }
}
            
          
!

JS

            
              
            
          
!
999px

Console