Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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>

<!--HEADER-->
<header id="header">
  <div class="wrapper">
    <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNzBwdCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC0xMSA3MC45NzcyOTEgNzAiIHdpZHRoPSI3MHB0Ij4KPGcgaWQ9InN1cmZhY2UxIj4KPHBhdGggZD0iTSAwLjc1MzkwNiAyNS42ODc1IEwgMTAuNTE1NjI1IDI5LjcxODc1IEwgOC40NDUzMTIgMzAuNjgzNTk0IEMgNy44NjMyODEgMzAuOTgwNDY5IDcuNjA1NDY5IDMxLjY3MTg3NSA3Ljg2MzI4MSAzMi4yNzM0MzggTCAxMC42NzU3ODEgMzguMzE2NDA2IEMgMTAuODEyNSAzOC42MTMyODEgMTEuMDY2NDA2IDM4Ljg0NzY1NiAxMS4zNzEwOTQgMzguOTU3MDMxIEMgMTEuNjcxODc1IDM5LjA4NTkzOCAxMi4wMTU2MjUgMzkuM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MTkgNjcuNjkxNDA2IDAuODY3MTg4IDY1LjYwOTM3NSAwLjYxNzE4OCBDIDYzLjI5Njg3NSAwLjI2OTUzMSA2MC45MzM1OTQgMC42MzI4MTIgNTguODMyMDMxIDEuNjYwMTU2IEwgMzkuODU1NDY5IDEwLjUxNTYyNSBMIDE5LjQ4NDM3NSAyLjU2MjUgQyAxNi45MTc5NjkgMS41OTc2NTYgMTQuODgyODEyIDEuNjIxMDk0IDEzLjQ1NzAzMSAyLjY1MjM0NCBDIDEyLjI2MTcxOSAzLjYzMjgxMiAxMS41ODIwMzEgNS4xMDkzNzUgMTEuNjA5Mzc1IDYuNjYwMTU2IEMgMTEuNjIxMDk0IDcuMDQ2ODc1IDExLjgyMDMxMiA3LjQxNDA2MiAxMi4xNDA2MjUgNy42MzY3MTkgTCAyNS44NjMyODEgMTcuMDM5MDYyIEwgMTcuOTk2MDk0IDIwLjc2MTcxOSBMIDQuODA4NTk0IDE3LjQ2MDkzOCBDIDQuMjY5NTMxIDE3LjMzMjAzMSAzLjcwNzAzMSAxNy41NzQyMTkgMy40MzM1OTQgMTguMDU0Njg4IEwgMC4xNjAxNTYgMjMuOTM3NSBDIC0wLjE3NTc4MSAyNC41MzUxNTYgMC4wMzUxNTYyIDI1LjI4OTA2MiAwLjYzMjgxMiAyNS42MjUgQyAwLjY3MTg3NSAyNS42NDg0MzggMC43MTQ4NDQgMjUuNjY3OTY5IDAuNzUzOTA2IDI1LjY4NzUgWiBNIDAuNzUzOTA2IDI1LjY4NzUgIiBzdHlsZT0iIHN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6cmdiKDAlLDAlLDAlKTtmaWxsLW9wYWNpdHk6MTsiIC8+CjwvZz4KPC9zdmc+" id="header-img"/>
<!-- <img src="https://www.flaticon.com/free-icon/airplane_1085510?related_item_id=1085493&term=plane" id="header-img" href="#"> -->
    <nav id="nav-bar">
      <ul>
        <li class="menu"><a class="nav-link" href="#">HOME</a></li>
        <li class="menu"><a class="nav-link" href="#About">ABOUT</a></li>
        <li class="menu"><a class="nav-link" href="#Pricing">PRICING</a></li>
      <a class="nav-link" href="#Contact"><button>BOOK NOW</button></a>
      </ul>
    </nav>
  </div>
  <div class="image" id="background-img"></div>
  <div class="center-title"><h2>DISCOVER</h2></div>
  <div class="center-title"><h1>MEXICO</h1></div>
  <div id="center"><button href="#Contact">BOOK NOW</button></div>
</header>

<!--ABOUT-->
<section id="About">
  <h2 class="about">WELCOME TO MEXICO!</h2>
  <h3 class="quote">A magical place where you'll find what you've been looking for.</h3>
    <div class="p1">
      <p>We're a professional travel agency with over 20 years of experience dedicated to provide the best travels at the best prices for every person. Our main goal is to create experiences at all times; even before your trip begins. To meet and exceed the expectations of each of our clients.</p>
      
      <p>Don't know where to go? Watch the video and decide for yourself!</p>
    </div>
  
    <div class="video-container">
      <iframe id="video" height="315" src="https://www.youtube.com/embed/YqyYenoVADU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
 
</section>

<!--PRICING-->
<section id="Pricing">
  <h2 class="about">PRICING</h2>
  <h3 class="quote">Check out our amazing packages!</h3>
  
  <div class="pricing-table">
    <div class="pricing-card">
      <h3 class="pricing-card-header">BASIC</h3>
      <h2 class="price">$499</h2>
      <ul>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
      </ul>
      <a href="#Contact" class="order-btn">ORDER NOW</a>
    </div>
    
    <div class="pricing-card">
      <h3 class="pricing-card-header">PREMIUM</h3>
      <h2 class="price">$799</h2>
      <ul>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
      </ul>
      <a href="#Contact" class="order-btn">ORDER NOW</a>
    </div>
    
    <div class="pricing-card">
      <h3 class="pricing-card-header">DELUXE</h3>
      <h2 class="price">$999</h2>
      <ul>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
      </ul>
      <a href="#Contact" class="order-btn">ORDER NOW</a>
    </div>
  </div>
  
</section>

<!--CONTACT-->
<section id="Contact">
  <h2 class="about">CONTACT US</h2>
  <h3 class="quote">Enough about us, we want to hear from you!</h3>
  
  <form id="form" action="https://www.freecodecamp.com/email-submit">
    <div class="form-group">
      <label id="name-label">
        <p>NAME</p>
        <input type="text" name="name" id="name" class="form-control" placeholder="Name" required>
      </label>
    </div>
    
    <div class="form-group">
      <label id="email-label">
        <p>EMAIL</p>
        <input type="email" name="email" id="email" class="form-control" placeholder="Email" required>
      </label>
    </div>
    
    <div class="form-group">
      <label id="subject-label">
        <p>SUBJECT</p>
        <select name="dropdown" id="subject" class="form-control" required>
          <option value="Booking">
            Booking
          </option>

          <option value="Suggestion">
            Suggestion
          </option>

          <option value="Question">
            Question
          </option>

        </select>
      </label>
    </div>
    
    <div class="form-group">
      <label id="message-label">
        <p>YOUR MESSAGE</p>
        <textarea name="comment" id="comments"></textarea>
      </label>
    </div>
    
    <input type="submit" value="SUBMIT" id="submit"/>
    
  </form>
</section>
              
            
!

CSS

              
                /*FONTS*/
@import url(https://fonts.googleapis.com/css?family=Oswald);
@import url('https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:[email protected]&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand:[email protected]&display=swap');

/*GENERAL SETTINGS*/

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

.content{
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 1;
}

section{
  padding-top: 45px;
  height: 100%;
  margin-bottom: 70px;
/*   background-color: green; */
}

@media (max-width: 650px){
  section{
    margin-bottom: 150px;
  }
}

/*HEADER*/
#background-img{
  height: 100vh;
  margin-bottom:0px;
  position: relative;
}

header .image{
  background-image:url(https://images.pexels.com/photos/3591074/pexels-photo-3591074.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/*TITLE*/
.center-title h2{
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -390%);
  font-family: 'Open Sans Condensed';
  color: white;
  letter-spacing: 20px;
  font-size: 40px;
}

.center-title h1{
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  text-align: center;
  transform: translate(-45%, -140%);
  font-family: oswald;
  color: white;
  font-size: 65px;
  letter-spacing: 35px;
  font-weight: bolder;
}

#center{
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 5%);
}

#center button{
  background-color: #1588A0;
  color: white;
  padding: 10px 35px;
  margin: 20px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-family: oswald;
  letter-spacing: 2px;
}

@media (max-width: 650px){
  .center-title h2{
    font-size: 20px;
  }
  
  .center-title h1{
    font-size: 35px;
  }
}

@media (max-width: 650px){
  #center button{
    padding: 6px 15px;
    font-size: 15px;
  }
}

/*NAVIGATION BAR*/
li, a, button{
  font-family: "Open Sans Condensed";
  font-size: 14px;
  color: #EDF0F1;
  text-decoration: none;
}

#header-img{
  height: 30px;
  width: auto;
/*   cursor: pointer; */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.wrapper{
  display: flex;
  background-color: rgba(200, 210, 222, 1);
  justify-content: space-between;
  align-items: center;
  padding: 15px 10%;
  position: fixed;
  width: 100%;
  z-index: 1;
}

.menu{
  list-style: none;
  display: inline-block;
  padding: 0px 20px;
}

li a{
  cursor: pointer;
  transition: all 0.3s ease 0s;
  color: #454A4D;
}

li a:hover{
  color: #007891;
}

button{
  padding: 5px 15px;
  background-color: rgba(0,136, 169, 1);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease 0s;
}

button:hover{
  background-color: rgba(0, 136, 169, 0.8);
}

@media (max-width: 650px){
  .wrapper{
    background-color: rgba(200, 210, 222, 1);
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 1;
  }
}

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

@media (max-width: 650px){
  nav ul{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 650px){
  #header-img{
    margin-top: 15px;
    position: relative;
    margin: 0 auto;
  }
}

@media (max-width: 650px){
  ul button{
    display: none;
  }
}

/*ABOUT*/
.about{
  font-family: Oswald;
  font-weight: bold;
  padding-top: 40px;
  text-align: center;
}

.quote{
  font-family: Quicksand;
  margin-top: -3px;
  text-align: center;
  font-size: 15px;
  padding-bottom: 10px;
}

.p1{
  padding-top: 10px;
}

.p1 p{
  max-width: 600px;
  text-align: center;
  margin: 0 auto 20px;
  font-family: 'Open Sans Condensed';
}

.video-container{
  justify-content: center;
  position: relative;
  width: 100%;
  padding-bottom: 350px;
  height: 0;
}

#video{
  display: block;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

@media(max-width: 650px){
  
  .quote{
    padding: 10px;
  }
  
  .p1{
    padding: 0px 10px;
  }
}

/*PRICING*/
.pricing-table{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  width: min(1600px, 100%);
  margin: auto;
}

.pricing-card{
  flex: 1;
  max-width: 360px;
  background-color: white;
  border: 1px solid #D3D3D3;
  margin: 20px 10px;
  text-align: center;
  overflow: hidden;
  color: black;
  transition: 0.3s linear;
}

.pricing-card-header{
  background-color: #1588A0;
  display: inline-block;
  color: white;
  padding: 12px 30px;
  border-radius: 0 0 20px 20px;
  font-family: oswald;
  font-weight: bold;
  letter-spacing: 3px;
  font-size: 15px;
  transition: 0.4s linear;
}

.pricing-card:hover .pricing-card-header{
  box-shadow: 0 0 0 26em #1588A0;
}

.price{
  font-size: 50px;
  color: black;
  font-family: 'Open Sans Condensed';
  font-weight: bold;
  margin: 40px 0;
  transition: 0.2s linear;
}

.pricing-card:hover, .pricing-card:hover .price, .pricing-card:hover li{
  transition: 1s;
  color: white;
}

.pricing-card li{
  font-family: Quicksand;
  font-size: 16px;
  padding: 10px 0;
  list-style: none;
  color: black;
}

.order-btn{
  display: inline-block;
  margin: 80px 0 40px 0;
  border: 2px solid #1588A0;
  color: #1588A0;
  font-family: Oswald;
  padding: 18px 40px;
  border-radius: 8px;
  transition: 0.3s linear;
}

.order-btn:hover{
  background-color: #034754;
  border: 2px solid #034754;
  color: white;
}

@media (max-width: 650px){
  .pricing-card{
    flex: 50%; 
  }
}

/*CONTACT*/
.contact{
  font-family: Oswald;
  font-weight: bold;
  padding-top: 40px;
  text-align: center;
}

form{
  margin: 10px auto;
  max-width: 400px;
  padding: 20px 12px 10px 20px;
}

form label{
  margin:0 0 3px 0;
  padding:0px;
  padding-bottom: 10px;
  display: block;
  font-weight: bold;
}

form label p{
  font-family: 'Open Sans Condensed';
  text-align: left;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.form-control{
  box-sizing: border-box;
  border:1px solid #BEBEBE;
  padding: 7px;
  margin: 0px;
  width: 100%;
}

textarea{
  min-height: 120px;
  width: 100%;
  padding: 5px;
  resize: vertical;
  display: inline-block;
}

#submit{
  background-color: #1588A0;
  font-family: oswald;
  padding: 8px 15px 8px 15px;
  border: none;
  color: #fff;
}
              
            
!

JS

              
                
              
            
!
999px

Console