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

              
                <div class="container">
  <div class="newsletter">
    <section class="name">
      <p>Springfield Shopper</p>
    </section>

    <section class="info">
      <p>DAILY NEWS</p>
      <p>35¢</p>
    </section>

    <section class="title">
      <h1>
        <span>Simpsons scam</span>
        <span>Springfield</span>
      </h1>
    </section>

    <section class="content">
      <article class="left-side">
        <h2>
          <span>Angry Mob</span>
          <span>Mulls Options</span>
        </h2>
        <div>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
        </div>
      </article>
      <article class="right-side">
        <img src="https://i.ibb.co/R6vng5P/family-simpson.jpg" alt="Simpsons family photo">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's</p>
      </article>
    </section>
  </div>
</div>
              
            
!

CSS

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

body {
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
  background-color: dimgray;
}

.container {
  animation: scale-up 2.5s linear;
}

.newsletter {
  width: 800px;
  background-color: whitesmoke;
  padding: 5px;
  border: 1px solid black;
  transform: rotate(-5deg);
  animation: rotate 0.5s linear 5;
  position: relative;
}

.newsletter::before {
  content: '';
  width: 8px;
  height: 98%;
  position: absolute;
  left: -10px;
  top: 1%;
  background-color: whitesmoke;
  border: 1px solid black;
}

.newsletter::after {
  content: '';
  width: 8px;
  height: 96%;
  position: absolute;
  left: -19px;
  top: 2%;
  background-color: whitesmoke;
  border: 1px solid black;
}

.name {
  display: flex;
  justify-content: center;
  padding-bottom: 20px;
  font-size: 60px;
}

.info {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  padding: 10px 5px;
}

.title h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  font-size: 65px;
}

.content {
  display: flex;
}

.left-side {
  display: flex;
  flex-direction: column;
}

.left-side h2 {
  display: flex;
  flex-direction: column;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  padding: 10px 5px;
}

.left-side div {
  display: flex;
}

.left-side div p {
  padding: 5px;
}

.right-side {
  padding: 0 10px;
  font-size: x-small;
}

@keyframes rotate {
  0% {transform: rotate(0deg);}
  100% {transform: rotate(-360deg);}
}

@keyframes scale-up {
  0% {transform: scale(1%);}
  100% {transform: scale(100%);}
}
              
            
!

JS

              
                
              
            
!
999px

Console