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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <main>
  <h1>Full Bleed Images in Wrapper with Max Width</h1>
  <article>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Risus in hendrerit gravida rutrum quisque. Nulla facilisi morbi tempus iaculis urna. Eros donec ac odio tempor orci dapibus ultrices in. Elit pellentesque habitant morbi tristique senectus et netus. Posuere morbi leo urna molestie at elementum eu facilisis. Nulla aliquet enim tortor at auctor. Enim ut sem viverra aliquet. In massa tempor nec feugiat nisl. Egestas sed tempus urna et pharetra pharetra massa massa. In egestas erat imperdiet sed euismod nisi. Nec feugiat in fermentum posuere urna nec. Aliquam purus sit amet luctus venenatis lectus magna.</p>

    <p>Amet tellus cras adipiscing enim. At varius vel pharetra vel. Elit sed vulputate mi sit amet mauris. Senectus et netus et malesuada fames ac. Egestas quis ipsum suspendisse ultrices gravida dictum fusce ut placerat. Augue lacus viverra vitae congue eu. Feugiat in ante metus dictum at tempor commodo. Porttitor lacus luctus accumsan tortor. Rhoncus dolor purus non enim praesent elementum facilisis. Rhoncus aenean vel elit scelerisque mauris pellentesque pulvinar. Nullam ac tortor vitae purus faucibus ornare suspendisse sed. Adipiscing tristique risus nec feugiat in. Commodo viverra maecenas accumsan lacus vel facilisis volutpat est. Nisl nunc mi ipsum faucibus vitae aliquet nec ullamcorper sit.</p>

    <p><img class="full-bleed" src="https://images.unsplash.com/photo-1503104538136-7491acef4d5d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80" alt="iceland landscape"></p>

    <p>Sit amet facilisis magna etiam tempor. Quis blandit turpis cursus in hac habitasse platea dictumst. Non blandit massa enim nec dui nunc mattis enim. Ultricies mi eget mauris pharetra et ultrices neque ornare aenean. Ac turpis egestas sed tempus. Sit amet aliquam id diam maecenas ultricies mi eget. Euismod in pellentesque massa placerat duis ultricies lacus sed. Risus nullam eget felis eget nunc lobortis mattis aliquam. Vel fringilla est ullamcorper eget nulla facilisi etiam dignissim. Ut sem viverra aliquet eget sit amet tellus. Massa sed elementum tempus egestas. Commodo nulla facilisi nullam vehicula ipsum a arcu cursus. Diam donec adipiscing tristique risus nec. Morbi tincidunt ornare massa eget egestas purus viverra accumsan. Eu ultrices vitae auctor eu augue ut lectus. Tempus iaculis urna id volutpat lacus laoreet non. Morbi non arcu risus quis. Dis parturient montes nascetur ridiculus mus. Facilisis sed odio morbi quis commodo.</p>

    <img class="full-bleed" src="https://images.unsplash.com/photo-1505832018823-50331d70d237?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2108&q=80" alt="scotland">

    <p>Ut aliquam purus sit amet. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc. Lacus sed turpis tincidunt id. Rhoncus dolor purus non enim praesent. Consectetur a erat nam at lectus urna. Rhoncus est pellentesque elit ullamcorper dignissim. Arcu risus quis varius quam. Ut lectus arcu bibendum at varius vel pharetra vel turpis. Lacinia at quis risus sed vulputate odio ut enim blandit. Nisi vitae suscipit tellus mauris a diam maecenas sed enim.</p>

    <p>Vel fringilla est ullamcorper eget nulla facilisi etiam. Elementum pulvinar etiam non quam lacus suspendisse. Vehicula ipsum a arcu cursus vitae congue mauris rhoncus. Neque volutpat ac tincidunt vitae semper quis lectus. Diam vel quam elementum pulvinar etiam non quam lacus suspendisse. Auctor urna nunc id cursus metus aliquam eleifend mi in. Venenatis a condimentum vitae sapien pellentesque habitant. Semper risus in hendrerit gravida rutrum quisque. Tortor pretium viverra suspendisse potenti nullam ac tortor. Felis imperdiet proin fermentum leo vel orci. Aliquam purus sit amet luctus venenatis lectus magna.</p>
  </article>
</main>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* 
    Maybe can mofidy the
    paddings to avoid horizontal
    scrollbar, instead of using
    this
  */
  overflow-x: hidden;
}

main {
  margin: 0 auto;
  padding: 32px;
}

h1 {
  text-align: center;
  margin: 1em auto;
}

article {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

article > * + * {
  margin-top: 1.5em;
}

img.full-bleed {
  max-width: 100vw;
}
              
            
!

JS

              
                
              
            
!
999px

Console