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

              
                <!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Piggycay</title>
  <link rel="stylesheet" href="stylesheet.css" type="text/css">
  </head>
  <body>
    <header id="header">
      <div id="logo">
         <img id="header-img" src="https://cdn1.imggmi.com/uploads/2019/9/17/658262de40aa321f820c941c592d84ee-full.png" alt="Piggycay Logo">
      </div>
      <nav id="nav-bar">
        <ul>
          <li><a class="nav-link" href="#features">Features</a></li>
          <li><a class="nav-link" href="#how-it-works">How It Works</a></li>
          <li><a class="nav-link" href="#pricing">Pricing</a></li>
        </ul>
      </nav>
    </header>
    <main>
      <div id="hero-image">
        <div id="hero-text">
          <h1>Come with us to the Bahamas and swim with pigs!</h1>
          <form id="form" action="https://www.freecodecamp.com/email-submit">
          <input
            type="text"
            name="name"
            id="name"
            class="input-field"
            placeholder="Your Name"
            required>
          <input
            type="email"
            name="email"
            id="email"
            class="input-field"
            placeholder="Your Email Address"
            required>
            <div id="oint-button">
              <input id="submit" type="submit" value="Oink! I'm in!" class="button" />
            </div>
          </form>
        </div> <!-- hero text-->
      </div> <!-- hero image-->

      <section id="features">
        <div class="grid">
          <div class="icon">
            <img src="https://cdn1.imggmi.com/uploads/2019/9/17/36c8fbca575e51fb6adaacd73f64f602-full.png">
          </div>
          <div class="description">
            <p>
              Spend an amazing time with adorable piggies!
            </p>
          </div>
        </div> <!-- grid -->
        <div class="grid">
          <div class="icon">
            <img src="https://cdn1.imggmi.com/uploads/2019/9/17/2d9e0ee77985a53190fac4c1bfbb78e2-full.png">
          </div>
          <div class="description">
            <p>
              Enjoy the sun and beach!
            </p>
          </div>
        </div> <!-- grid -->
        <div class="grid">
          <div class="icon">
            <img src="https://cdn1.imggmi.com/uploads/2019/9/17/18d10437d3ac352101912d621770832f-full.png">
          </div>
          <div class="description">
            <p>
              Make happy memories for a lifetime!
              </p>
          </div>
        </div> <!-- grid -->
      </section>
      <section id="how-it-works">
        <h2>
        Watch the piggies in action!
        </h2>
        <div id="video-container">
          <iframe id="video" height="315" src="https://www.youtube.com/embed/8SQNzfnywSo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        </div>
      </section> <!-- video -->

      <section id="pricing">
        <div class="product">
          <h2 class="product-headline">Don't break the (Piggy) bank</h2>
          <h3>$400</h3>
          <ul>
            <li>Value package to make your dream come true</li>
            <li>Includes boat ride from Nassau to the Pig Island</li>
            <li>Spend the day swimming with cute little piggies.</li>
          </ul>
          <button class="button">Select</button>
        </div>

        <div class="product">
          <h2 class="product-headline">Ultimate Piggy Extravangza</h2>
          <h3>$1000</h3>
          <ul>
            <li>Comfortable flight from Nassau to George Town, Exuma</li>
            <li>Luxury transport by speed boat from George Town to Pig Beach</li>
            <li>1 night in a 5-star hotel in Exuma</li>
          </ul>
          <button class="button">Select</button>
        </div> <!-- pricing -->
      </section>
    </main>

    <footer>
      <hr />
      <p>
        all icons by <a href="https://icons8.com">Icon8</a> | all illustrations by <a href="https://www.freepik.com/free-photos-vectors/design">freepik</a>
        </p>
      <p>
        this website was designed by Michelle Liebheit
      </p>
    </footer>
  </body>
</html>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Montserrat:500|Roboto&display=swap');

body, html {
  margin: 0;
  padding: 0;
  background-color: #ffecd2;
  font-family: 'Roboto', sans-serif;
  text-align: center;
  height: 100%;
}

/* font styling */

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
}

p {
  font-family: 'Roboto', sans-serif;
}

a {
  color: #635b57;
  text-decoration: none;
}

a:hover {
  color: #ff0066;
}

a:visited {
  color: #2e387e;
}

/* navigation */

#header {
  position: fixed;
  top: 0;
  min-height: 75px;
  width: 100%;
  padding: 0px 5px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  background-color: #ffecd2;
}

@media screen and (max-width: 650px) {
  #header {
    flex-flow: column nowrap;
    padding: 0;
  }
}

#logo {
  width: 200px;
}

#header-img {
  max-width: 100%;
  max-height: auto;
}

nav > ul {
  width: 35vw;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  list-style: none;
  padding: 0;
}

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

/* main */

main {
  margin: 100px auto 0 auto;
  align-content: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 480px) {
  main {
    margin-top: 150px;
   }
}


/* form */
#hero-image {
  width: 100%;
  height: 60vh;
  background-image: url("https://cdn1.imggmi.com/uploads/2019/9/17/34137a2ef553a02b43a7e6e50706f7f7-full.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  text-align: center;
  align-content: center;
  justify-content: center;
}

@media (max-width: 480px) {
  #hero-image {
    height: 60vh;
   }
  #hero-text > h1 {
    font-size: 24px;
  }
}

#hero-text {
  display: flex;
  flex-flow: column nowrap;
  align-content: center;
  justify-content: center;
  text-align: center;
  margin: 0 5%;
  max-width: 500px;
}

#hero-text > h1 {
  color: #FFF;
}

#hero-text input[type="email"] {
  max-width: 80%;
  padding: 5px;
}

#hero-text input[type="text"] {
  max-width: 80%;
  padding: 5px;
}

#hero-text input[type="submit"] {
  width: 200px;
  height: 50px;
  margin: 15px 0;
  border: 0;
  background-color: #ff0066;
  text-transform: uppercase;
  color: #FFF;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
}

#hero-text input[type="submit"]:hover {
  background-color: #ff99cc;
  transition: background-color 1s;
}

button {
  padding: 0 20px;
  height: 40px;
  font-size: 14px;
  font-weight: 900;
  border: 3px black solid;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;

}

/* description */

.grid {
  display: flex;
  justify-content: center;
  align-content: center;
}

#features {
  margin-top: 30px;
}

#features .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  width: 20vw;
  height: 125px;
}

  @media screen and (max-width:480px) {
    #features .icon {
      display: none;
    }
}

#features .description {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  font-style: italic;
  width: 40vw;
  height: 125px;
  padding: 5px;
}

  @media screen and (max-width:480px) {
    #features .description {
      width: 100%;
      height: 60px;
      text-align: center;
      padding: 0;
    }
}

/* video */

#video-container {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

#video-container > iframe {
  max-width: 560px;
  width: 100%;
}


/* pricing */

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

.product {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 40%;
  margin: 10px;
  border: 1px solid #000;
  border-radius: 3px;
}

.product-headline {
  width: 100%;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0;
}

.product > h2 {
  margin-top: 15px;
}

.product > ul {
  list-style: none;
  margin: 0;
  padding: 0 15px;
}

.product > ul > li {
  padding: 5px 0;
}

.product > button {
  border: 0;
  margin: 15px 0;
  background-color: #ff0066;
  font-weight: 400;
  cursor: pointer;
  color: #FFF;
  border-radius: 5px;
}

.product > button:hover {
  background-color: #ff99cc;
  transition: background-color 1s;
}

@media (max-width: 480px) {
  #pricing {
    flex-direction: column;
  }
  .product {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
  }
}


/* footer */

footer {
  margin-top: 30px;
  font-size: 12px;
  padding: 20px;
}

              
            
!

JS

              
                
              
            
!
999px

Console