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.

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 id="main">
    <h1 id="title">Don't give up dreams</h1>
    <div id="img-div">
      <img src="https://i.postimg.cc/90pbzSsh/a2g7u-3355z.png" alt="logo" id="image">
      <div id="img-caption">
        <p>I'm the man who'll become the pirate king</p>
        <p>--Monkey D. Luffy</p>
      </div>
    </div>
    <div id="tribute-info">
      <div class="info">
        <p>Sea of Survival: Super Rookies Saga</p>
        <ul>
          <li>East Blue Saga</li>
          <li>Alabasta Saga</li>
          <li>Sky Island Saga</li>
          <li>Water 7 Saga</li>
          <li>Thriller Bark Saga</li>
          <li>Summit War Saga</li>
        </ul>
      </div>
      <div class="info">
        <p>The Final Sea: The New World Saga</p>
        <ul>
          <li>Fish-Man Island Arc</li>
          <li>Dressrosa Saga</li>
          <li>Yonko Saga</li>
        </ul>
      </div>
    </div>
    <a href="https://one-piece.com/" id="tribute-link" target="_blank">More info about One Piece</a>
  </div>

  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Piedra&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style-type: none;
}

body {
  background: url(https://i.postimg.cc/28mqj3zh/ONE-PIECE.jpg) no-repeat center center / cover;
  background-attachment: fixed;
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  font-family: "Chelsea Market", cursive;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

#title {
  margin: 15px 0;
  font-size: 40px;
  letter-spacing: 5px;
  text-transform: uppercase;
}

#img-div {
  width: 100%;
}

#img-div img {
  display: block;
  margin: auto;
  max-width: 50%;
}

#img-caption p {
  position: relative;
  font-size: 20px;
  margin: 15px 0 0;
}

#img-caption P:last-child {
  margin: 0 0 50px;
}

#tribute-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
}

#tribute-info .info {
  padding: 15px;
  position: relative;
  background: rgba(255, 255, 255, 0.4);
  color: #000;
  font-size: 24px;
  font-family: "Piedra", cursive;
  border-radius: 10px;
  letter-spacing: 2px;
}

#tribute-info .info:first-child {
  margin-right: 20px;
}

#tribute-info .info p {
  font-size: 24px;
  padding-bottom: 20px;
}

#tribute-info .info::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, #0984e3 30%, #00f 80%);
  width: 100%;
  height: 60px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  z-index: -1;
}

#tribute-info .info ul li {
  padding-top: 5px;
  letter-spacing: 2px;
}

#tribute-link {
  position: absolute;
  right: 10px;
  bottom: 0;
  color: #fff;
}

@media (max-width: 800px) {
  #title {
    padding-top: 50px;
  }

  #img-div img {
    max-width: 70%;
  }

  #img-caption p {
    font-size: 16px;
  }

  #img-caption P:last-child {
    text-align: center;
  }

  #tribute-info {
    flex-direction: column;
    align-items: center;
  }

  #tribute-info .info:first-child {
    margin: 0 0 20px 0;
  }
}
              
            
!

JS

              
                

              
            
!
999px

Console