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>

<body>

  <header id="header">
    <div id="nav-bar-wrapper">
     <nav id="nav-bar">
      <a class="nav-link" href="#who-are-we">Who are we</a>
      <a class="nav-link" href="#what-can-we-do">What we do</a>
      <a class="nav-link" href="#special-offer">Special offer!</a>
      <a class="nav-link" href="#vid">See us in action!</a>
      <a class="nav-link" href="#enter">Email us</a>
    </nav>
    </div>
    <img id="header-img" src="https://i.imgur.com/hI3Fr6M.jpg" alt="black cat in the sun facing camera">

  </header>
  <main>
    <div id="container">
      <h2 id="who-are-we">Who are we</h2>
      <p id="who">We are cat lovers with a goal: to take care of your cats and kittens when you have to go away from home. We feed them, pet them, change their litters, play with them, and give them a good time everyday while you're not at home.</p>
      <h2 id="what-can-we-do">What we do for you</h2>
      <p id="what">We give you the relief of knowing your cat is treated with love by a team of reliable people who know their job well and, specially, love what they do. Two hours a day every day. We open windows so we got some light, turn on the heater if it's cold. We are careful not to leave your cat or your home in a hazardous situation.</p>
        <p>We remember they were treated like gods in Ancient Egypt! They deserve a god's due.</p>
      <div id="container-imgs">
        <img id="egyptian-cat" class="cats" src="https://i.imgur.com/Morbzf4.jpg" alt="a cat face mostly in green with Egyptian symbols">
        <img id="black-cat" src="https://i.imgur.com/Jm70mLN.jpg" class="cats" alt="black hairless cat with long tail">
        <img id="pharoah-cat" src="https://i.imgur.com/oxbG9Aj.jpg" class="cats" alt="orange cat with pharoah headpiece">
      </div>
      <h2 id="special-offer">Special offer!</h2>
      <p id="offer">For the next three months only! If you refer us to a friend, we'll charge you only half the fee in any moment during these three months. Half the fee for any number of days!</p>
      <h2 id="vid" class="target-label">Here you can see us in action! </h2>
      <video id="video" width="320" height="240" controls src="#"></video>
      <h2 id="enter">And you can email us here for more info</h2>
      <form id="form" action="https://www.freecodecamp.com/email-submit">
        <input name="email" id="email" type="email" placeholder="Your email here for info" required="">
        <input id="submit" type="submit" value="Submit" class="btn">
      </form>
    </div>
  </main>
 </body>
              
            
!

CSS

              
                header {
  display: flex;
  flex-flow: column nowrap;
  background-image: transparent;
  justify-content: center;
  margin-top: 0;
  padding-top: 0;
  border-radius: 20px;
}
html {
  overflow: scroll;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
#nav-bar {
  display: flex;
  justify-content: space-around;
}
#nav-bar-wrapper {
  width: 100%;
  height: 100%;
  box-shadow: 2px 2px 5px black;
}
@media screen and (max-width: 599px) {
  #nav-bar {
    visibility: hidden;
  }
}
@media screen and (max-width: 599px) {
  #nav-bar-wrapper {
    visibility: hidden;
  }
}
.nav-link {
  color: black;
  text-decoration: none;
  background-color: #e6c073;
  width: 100%;
  padding-top: 2px;
  padding-bottom: 2px;
  text-align: center;
  font-family: candara;
  transition: 1s;
}
.nav-link:hover {
  border: 1.05px solid black;
  transform: scale(1.1);
  background-color: #fffeb8;
  cursor: pointer;
  box-shadow: 2px 2px 10px black;
}
#header-img {
  width: 20%;
  align-self: center;
  padding-top: 0px;
  padding-bottom: 0px;
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 4px 4px 5px black;
}
#header-img:hover {
  animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
}
@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}
@media screen and (max-width: 599px) {
  #header-img {
    width: 200px;
  }
}
body {
  background-color: #c86f5e;
}
main {
  display: flex;
  flex-direction: column;
  top: 45px;
  left: 15px;
  right: 15px;
  bottom: 0;
  border-radius: 20px;
}
#container {
  display: flex;
  flex-flow: column nowrap;
  background-color: white;
  padding-top: 20px;
  border-radius: 10px;
  padding-left: 20px;
  padding-right: 20px;
  margin-top: 0px;
  margin-left: 40px;
  margin-right: 40px;
  padding-bottom: 20px;
  width: 60%;
  justify-content: center;
  align-self: center;
  box-shadow: 2px 2px 5px black;
}
@media screen and (max-width: 599px) {
  #container {
    width: 100%;
  }
}
h2 {
  font-family: candara;
  text-align: center;
  border-radius: 10px;
  background-color: #e6c073;
  box-shadow: 2px 2px 5px black;
}
p {
  font-family: candara;
}
#container-imgs {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
}
.cats {
  border-radius: 10px;
  box-shadow: 2px 2px 5px black;
  margin-left: 10px;
  margin-right: 10px;
  width: 25%;
  height: auto;
  transition: 0.5s;
}
.cats:hover {
  box-shadow: 2px 2px 10px black;
  transform: scale(1.05);
}
#video {
  align-self: center;
}
@media screen and (max-width: 599px) {
  #video {
    width: 250px;
    height: auto;
  }
}
#form {
  align-self: center;
}
.btn {
  transition: 0.2 all;
}
.btn:hover {
  background-color: #e6c073;
  cursor: pointer;
}
.btn:active {
  transform: scale(0.98); 
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24); 
}
 @media screen and (max-width: 599px) {
  #container-imgs {
    flex-flow: column nowrap;
    justify-content: center;
    align-items: space-around;
}
@media screen and (max-width: 599px);
.cats {
  width: 50%;
  align-self: center;
  margin-top: 10px;
  margin-bottom: 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