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

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

<link href="https://fonts.googleapis.com/css2?family=New+Tegomin&display=swap" rel="stylesheet">

<div id="page-wrapper">
  <header id="header">
    <div class="logo">
      <img id="header-img" src="https://res.cloudinary.com/daj8rybhe/image/upload/v1626809940/dragonshoardlogo_akn2we.png" alt="Dragon's Hoard logo" />
    </div>

    <nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#what-we-do">What We Do</a></li>
        <li><a class="nav-link" href="#check-it-out">Check It Out</a></li>
        <li><a class="nav-link" href="#prices">Prices</a></li>
    </nav>
  </header>

  <div class="container"></div>
  <section id="text">
    <h2>Custom Dice Sets</h2>
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <input name="email" id="email" type="email" placeholder="Enter your email address" required />
      <input id="submit" type="submit" value="Build Your Hoard" class="btn" />
    </form>
  </section>

  <div class="container">
    <section id="what-we-do">
      <div class="grid">
        <div class="desc">
          <h2>Your dice, your hoard</h2>
          <p>At Dragon's Hoard, we're committed to creating dice any player would be proud to have in their collection.
          </p>
        </div>
      </div>
      <div class="grid">
        <div class="desc">
          <h2>High-quality materials, fast shipping</h2>
          <p>If you're not happy, we will make it right with a replacement or your money back.
          </p>
        </div>
      </div>
    </section>
    <section id="check-it-out">
      <iframe id="video" height="315" src="https://www.youtube.com/embed/Kv2tYzPOZug?controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </section>
    <section id="prices">
      <div class="sets" id="seven">
        <div class="level">7 dice set</div>
        <h2>$9.75</h2>
        <ol>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum dolor.</li>
          <li>Lorem ipsum.</li>
        </ol>
        <button class="btn">Select</button>
      </div>
      <div class="sets" id="eleven">
        <div class="level">11 dice set</div>
        <h2>$11.75</h2>
        <ol>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum dolor.</li>
          <li>Lorem ipsum.</li>
        </ol>
        <button class="btn">Select</button>
      </div>
      <div class="sets" id="fifteen">
        <div class="level">15 dice set</div>
        <h2>$14.25</h2>
        <ol>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum.</li>
          <li>Lorem ipsum dolor.</li>
          <li>Lorem ipsum.</li>
        </ol>
        <button class="btn">Select</button>
      </div>
    </section>
    <footer>
      <ul>
        <li><a href="#">Privacy</a></li>
        <li><a href="#">Terms</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
      <span>Copyright 2021, Dragon's Hoard</span>
    </footer>
  </div>
</div>
              
            
!

CSS

              
                /** global element styling **/

@import "https://fonts.googleapis.com/css2?family=Mulish&display=swap";

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

body {
  background-color: #eee;
  font-family: "Mulish", sans-serif;
}

#page-wrapper {
  position: relative;
}

li {
  list-style: none;
}

a {
  color: #000;
  text-decoration: none;
}

/** global classes styling **/

.container {
  background-color: #eee;
  margin: 0 auto;
  max-width: 800px;
  width: 100%;
}
  
.btn {
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  border: 3px black solid;
  border-radius: 2px;
  height: 40px;
  padding: 0 20px;
  font-size: 1em;
  font-weight: 700;
}

.grid {
  display: flex;
}

header {
  position: fixed;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #fff;
  top: 0;
  min-height: 75px;
  padding: 0px 30px;
}

@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }
}

.logo {
  width: 55vw;
}

@media (max-width: 400px) {
  .logo {
    position: relative;
    margin-top: 20px;
    width: 100%;
  }
}

.logo > img {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-left: 20px;
  margin-top: 20px;
  width: 100%;
  height: 100%;
  max-width: 300px;
}

@media (max-width: 650px) {
  .logo > img {
    margin: 0 auto;
  }
}

nav {
  font-weight: 400;
}

@media (max-width: 650px) {
  nav {
    display: flex;
    flex-directional: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
    width: 100%;
    padding: 0 60px;
  }
  nav li {
    padding-bottom: 5px;
  }
}

nav > ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  width: 35vw;
}

@media (max-width: 650px) {
  nav > ul {
    flex-direction: column;
  }
}

#text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  height 200px;
  margin-top: 150px;
}

#text > h2 {
  text-transform: uppercase;
  word-wrap: break-word;
  margin-bottom: 10px;
}

#text input[type='email'] {
  padding: 5px;
  width: 100%;
  max-width: 275px;
}

#text input[type='submit'] {
  background-color: #FF6347;
  border: 1px solid #000;
  margin: 10px 0;
  height: 30px;
  width: 100%;
  max-width: 200px;
}

#text input[type='submit']:hover {
  background-color: red;
}

@media (max-width: 650px) {
  #text {
    margin-top: 150px;
  }
}

#what-we-do {
  margin-top: 30px;
}

#what-we-do .desc {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
  height: 125px;
  width: 80vw;
}

@media (max-width: 550px) {
  #what-we-do .desc {
    text-align: center;
    padding: 0;
    height: 150px;
    width: 100%;
  }
}

@media (max-width: 650px) {
  #what-we-do {
    margin-top: 0;
  }
}

#check-it-out {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

#check-it-out > iframe {
  width: 100%;
  max-width: 560px;
}

#prices {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 60px;
}

.sets {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #FFF380;
  width: calc(100% / 3);
  border: 1px solid #000;
  border-radius: 3px;
  margin: 10px;
}

.sets > .level {
  background-color: #EDE275;
  color: black;
  text-transform: uppercase;
  font-weight: 800;
  padding: 5px 5px;
  width: 100%;
}

.sets > h2 {
  margin-top: 10px;
}

.sets > ol {
  margin: 10px 0;
}

.sets > ol > li {
  padding: 5px 0;
}

.sets > button {
  background-color: #FFD801;
  font-weight: 500;
  margin: 15px 0;
  border: 1px solid #000;
}

.sets > button:hover {
  background-color: #FF6347;
}

@media (max-width: 700px) {
  #prices {
    flex-direction: column;
  }
  .sets {
    margin: 0 auto;
    margin-bottom: 10px;
    width: 100%;
    max-width: 200px;
  }
}

footer {
  background-color: #CECECE;
  padding: 15px;
  margin-top: 30px;
}

footer > ul {
  display: flex;
  justify-content: flex-end;
}

footer > ul > li {
  padding: 0 15px;
}

footer > span {
  color: #353533;
  display: flex;
  justify-content: flex-end;
  font-size: 1em;
  margin-top: 10px;
}





              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments.

              
            
!
999px

Console