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

              
                <header class="header container">
  <a class="logo" href="">🌼</a>
  <a class="phone" href="">+7 111 000 11 22</a>
</header>

<section class="promo">
  <div class="promo-inner container">
    <h1>Компания Ромашка</h1>
    <p>Нашими ромашками можно украсить всё! </p>
  </div>
</section>

<section class="images">
  <h2>тут какой-то блок, например слайдер на всю ширину страницы</h2>
</section>

<section class="text-block container">
  <h2>и блок и фон на ширину только на ширину контента</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae, error, labore. Neque eligendi iste reiciendis molestiae, libero, adipisci eius, error, dignissimos provident quod in maxime accusantium exercitationem accusamus vitae beatae rerum sapiente aut debitis voluptas maiores. Doloribus eum, quia magnam eos saepe illum, molestiae dicta eveniet praesentium. Error maiores veniam, praesentium quis quas voluptate corrupti qui obcaecati rem id blanditiis excepturi, ratione ad sapiente animi, quia facere laboriosam repellat eligendi.</p>
</section>

<section class="news">
  <div class="container">
    <h2>фон на всю ширину, а контент центрируется</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni porro beatae assumenda officia inventore culpa ea, unde enim, dignissimos placeat veritatis voluptates. Harum totam distinctio ipsum, sapiente perspiciatis nesciunt nam tempore repellat inventore laborum sed vitae beatae aperiam autem earum, officia, debitis quos nisi optio modi! Eius neque molestias vero, repellendus culpa voluptate incidunt voluptatibus veniam quaerat? Doloremque asperiores magnam hic nulla dicta vitae consectetur, ea, voluptas similique aliquid ab.</p>
  </div>
</section>

<footer class="footer container">
  <h2>футер - фона нет, контент ограничен</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo eveniet odio hic pariatur atque, voluptatum voluptatibus optio obcaecati nam perspiciatis suscipit est praesentium eius. Facilis.</p>
</footer>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&display=swap');

body {
  margin: 0;
  font-family: 'Amatic SC', cursive;
}

.container {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 30px 0;
  margin-bottom: 30px;
}

.header {
  display: flex;
  justify-content: space-between;
  padding: 30px 0;
  font-size: 30px;
}

.logo {
  text-decoration: none;
}

.phone {
  font-weight: bold;
  color: inherit;
  text-decoration: none;
}

.promo {
  min-height: 300px;
  font-size: 1.5em;
  background: url(https://sitist.ru/userfiles/image/info/chamomile.jpg) no-repeat bottom center / cover;
  color: #fff;
}

.images {
  background: #A4E5E8;
}

.text-block {
  background: #ff0;
}

.news {
  background: #ff0;
}

              
            
!

JS

              
                
              
            
!
999px

Console