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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <link href="https://fonts.googleapis.com/css?family=Birthstone" rel="stylesheet" type="text/css" />
<div id="page-wrapper">
<header id="header">
    <img id="header-img" class="logo-img" src="https://cdn.shopify.com/s/files/1/2679/2452/files/love-toilet-logo-2.png?v=1648507469"></img>
  <nav id="nav-bar">
    <div class="nav">
      <p><a class="nav-link" href="#video-container">Learn More</a></p>
    </div>
    <div class="nav">
      <p><a class="nav-link" href="#testimonials">Testimonials</a></p>
    </div>
    <div class="nav">
      <p><a class="nav-link" href="#sign-up">Sign Up</a></p>
    </div>
    </nav><!-- end #nav-bar -->
</header>
<body>
  <div id="hero-img-container">
    <div id="hero-img"><img class="hero-img" src="https://cdn.shopify.com/s/files/1/2679/2452/files/the-love-toilet-hero.jpg?v=1648565967"></img>
    </div><!-- end #hero-img -->
    <div id="hero-img-text"><h2>When you're in love, even five minutes apart can feel like an eternity.</h2>
    </div><!-- end #hero-img-text -->
  </div><!-- end #hero-img-container -->
  <section id="video-container">
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/avb1XbO0EIs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </section><!-- end #video-container -->
  <div id="testimonials">
    <div class="testimonial-box"><i><p class="testimonial">"At first we thought this was kind of a stupid idea, but after a few uses we realized we would never go back to separate toilets."</i><br><br>Sam and Diane Malone<br>Boston, MA</p></div>
    <div class="testimonial-box"><i><p class="testimonial">"Our favorite date night restaurant is Chipolte so this toilet was basically made for us. Now we can spend the entire evening together, even after the Chipolte send us to the bathroom! Thanks, Love Toilet!"</i><br><br>Bob and Phyliss Vance<br>Scranton, PA</p>
    </div>
    <div class="testimonial-box"><p class="testimonial"><i>"Finally, we can share everything!"</i><br><br>Thurgood and Mary Jane Jenkins<br>New York, NY</p>
    </div>
    <div class="testimonial-box"><p class="testimonial"><i>"It took a little while for Carrie to get on board, but now that she's embraced the togetherness, we've never been closer!"</i><br><br>Doug and Carrie Heffernan<br>Queens, NY</p>
    </div>
  </div><!-- end #testimonials -->
  <div id="sign-up">
    <p class="signup">Sign up to get discounts now.</p>
    <form id="form" action="https://www.freecodecamp.com/email-submit">
    <input id="email" type="email" name="email" placeholder="Enter your or your lover's email address here..." required><br>
    <input id="submit" type="submit" value="Submit, Lovers">
    </form>
  </div>
</body>
</div><!-- end #page-wrapper -->
              
            
!

CSS

              
                #page-wrapper{
  width: 100%;
}
header {
width: 100%;
  position: fixed;
  top: 0px;
  left: 0px;
  height: 8.2em;
  display: grid;
  grid-template-rows: 1fr 1fr;
  background: linear-gradient(180deg, #ff99ff, #ffffff);
  padding: 0em 0em .5em 0em;
}

#header-img {
  display: grid;
  margin: 1em auto 0em auto;
}

.logo-img {
  width: 311px;
}

#nav-bar {
  display: flex;
  width: 100%;
  margin: auto;
}

.nav {
  margin: auto;
  color: black;
  font-size: 1.11em;
}

a.nav-link:link {
  text-decoration: none;
}

#hero-img-container {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

#hero-img {
  margin: 8.7em auto 0em auto;
}

.hero-img {
  width: 100%;
  border-radius: 42px;
}

#hero-img-text {
  font-family: Birthstone;
  font-size: 1.7em;
  line-height: 1.5em;
  margin: -1em .5em 0em .5em;
  text-align: center;
}

#video-container {
  display: flex;
  justify-content: center;
  margin: -19em 0em 0em 0em;
}

#testimonials {
  display: grid;
  grid-template-rows: 1fr;
  grid-gap: .2em;
}

.testimonial-box {
  border-color: black;
  border-width: .1em;
  border-style: solid;
  border-radius: .42em;
  width: 85%;
  margin: 1em auto 0em auto;
  
}

p.testimonial {
  text-align: center;
  font-size: 1.42em;
  padding: .2em 1em .2em 1em;
}

p.signup {
  margin-top: 1em;
  font-size: 2em;
}

#sign-up {
  display: grid;
  justify-content: center;
}

#form {
  margin: -1.5em auto 0em auto;
}

#email {
  height: 2em;
  width: 25em;
}

#submit {
  font-size: 1em;
  color: blue;
  background-color: pink;
  border: none;
  padding: .5em 1em .5em 1em;
  margin: 1em auto 10em 4.2em;
  justify-content: center;
}





@media only screen and (min-width: 900px) {
  #page-wrapper{
  width: 100%;
}
header {
  width: 100%;
  position: fixed;
  top: 0px;
  left: 0px;
  height: 5.2em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, #ff99ff, #ffffff);
  padding: 0em 0em .5em 0em;
}

#header-img {
  display: grid;
  margin: 1em auto 0em auto;
}

.logo-img {
  width: 311px;
}

#nav-bar {
  display: flex;
  width: 100%;
  margin: auto;
}

.nav-link {
  margin: auto;
  color: black;
  font-size: 1.31em;
}

a.nav:link {
  text-decoration: none;
}

#hero-img-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 36em;
}

#hero-img {
  margin: 8.7em 5em 0em 0em;
}

.hero-img {
  width: 60%;
  margin-left: 20em;
  border-radius: 42px;
}

#hero-img-text {
  font-family: Birthstone;
  width: 75%;
  font-size: 3.7em;
  line-height: 1.5em;
  margin: 1.75em .5em 0em -1em;
  text-align: center;
}

#video-container {
  display: flex;
  justify-content: center;
  margin: -1em 0em 0em 0em;
}

#testimonials {
  width: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: auto;
}

.testimonial-box {
  border-color: black;
  border-width: .1em;
  border-style: solid;
  border-radius: .42em;
  width: 85%;
}
p.testimonial {
  font-size: 1.42em;
  text-align: center;
  padding: .2em 1em .2em 1em;
}
  
p.signup {
  margin-top: -1em;
  font-size: 3em;
}

  #sign-up {
    margin: 5em auto 0em auto;
  }

}
              
            
!

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