123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div id="main">
  <div class="header">
    <h1 id="title">Simo Häyhä</h1>
    <div id="img-div">
      <img id="image" src="https://i.imgur.com/adqTVIF.jpg" alt="Simo Häyhä - White Death" />
    <p id="img-caption">Simo Häyhä was nicknamed "White Death" by Russian soldiers.</p></div>
  </div>

  <div id="tribute-info">

    <h2>World War II's greatest bad-ass.</h2>
    
    <p>Simo Häyhä was a sniper for the 6th Company of JR 34 of the Finnish Army. He had 505 confirmed kills, but due to often using his SMG, with which very few of his kills were confirmed, he likely had around 800 kills.</p>
    
    <p>Because he was such a threat to the Russian Army, they devised many plans to take him out, such as counter-snipers and artillery strikes. On March 6th, 1940, they succeeded... sort of. He was shot with an explosive bullet in his lower left jaw which blew off his cheek. He was picked up by a fellow soldier who said that "half of his face was missing" and regained conciousness on March 13th, the day that peace was declared.</p>
    
    <p>Despite the Soviets' best efforts, Simo made a full recovery in the following years and went on to become a moose hunter and dog breeder. Simo Häyhä lived until age 96.</p>
    
    <div class="footer">
      <p>This is only the tip of the iceburg...<br />Read more about Simo on <a id="tribute-link" href="https://en.wikipedia.org/wiki/Simo_Häyhä" target="_blank">Wikipedia</a> and <a href="https://www.damninteresting.com/white-death/">this great article</a> by Jason Bellows.</p>
      
    </div>
  </div>

    
  </div>
            
          
!
            
              /* GENERAL */

body {
  margin: 3em 0;
  color: #555;
}

#image {
  margin: 0 auto;
  width: 50vw;
  border-radius: 1%;
  max-width: 1024px;
  box-shadow: 0em 0.2em 0.5em #aaa;
}

p {
  font-family: Georgia, "Times New Roman", serif;
}

#main {
  width: 80%;
  margin: 0 auto;
}

/* HEADER: TITLE/IMAGE/CAPTION */

.header {
  text-align: center;
}

h1 {
  margin: 0 0 0.5em;
  font: normal normal 100 4em "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#img-div {
  margin: 0 auto;
  text-align: center;
}

.header #img-caption {
  font-style: italic;
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
  font-size: 1em;
}

/* BODY: text, images, links */

#tribute-info p {
  font-size: 1.2em;
  text-align: justify;
}

#tribute-info h2 {
  font-size: 1.5em;
}

/* FOOTER */

.footer p {
  margin-top: 2em;
  padding-top: 2em;
  color: #999;
  border-top: solid 1px #eee;
  font: normal normal normal 0.9em "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: center;
}

.footer a {
  text-decoration: none;
  color: #88f;
}

.footer a:hover {
  text-decoration: underline;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console