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

              
                <header id="header" class="">
   
  <nav id="nav-bar">
    <a href="#home" class="nav-link">Home</a>
    <a href="#workouts" class="nav-link">Workouts</a>
    <a href="#contact" class="nav-link">Contact</a>  
   </nav>
  
  <div>
    <img src="https://www.onlinelogomaker.com/blog/wp-content/uploads/2017/11/gym-logo.jpg" alt="Wazito fitness logo" alt="wazito logo" id="header-img">
   </div>
   <div>
   <p class="slogan"> Stay Fit Stay Healthy</p>  
   </div>
</header>

 <div class="container" id="home">
      <div id="header-text">
      <h2 class="top-text">Wazito Fitness Center</h2>
      <h1>Keep Going Keep Training</h1>
      <h2>No Human Is Limited</h2>
      </div>
      </div>
    <div >
  <iframe id="video" src="https://www.youtube.com/embed/MZkjTN210EE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
</div>
<div id="workouts">
  <div>
  <h2>Workout Routine</h2>
    <hr>
  </div>
  <div class="workout">
    <div class="card">
      <h3>Workout 1: Chest And Triceps</h3>
      <hr>
      <p>Bench press</p>
      <p>Triceps dip</p>
      <p>Incline dumbbell press</p>
      <p>Incline dumbbell flye</p>
      <p>Triceps extension</p>
    </div>
    <div class="card">
      <h3>Workout 2: Back And Biceps</h3>
      <hr>
      <p>Pull-up</p>
      <p>Bent-over row</p>
      <p>Chin-up</p>
      <p>Standing biceps curl</p>
      <p>Seated incline curl</p>
    </div>
    <div class="card">
      <h3>Workout 3: Legs And Abs</h3>
      <hr>
      <p>Back squat</p>
      <p>Good morning</p>
      <p>Glute bridge</p>
      <p>Incline dumbbell press</p>
      <p>Incline dumbbell flye</p>
    </div>
  </div>
  <div id="contact">
    <h2> Contact Us</h2>
    <hr>
    <form id="form" action=" https://www.freecodecamp.com/email-submit">
  <ul class="flex">
    <li>
      <label for="name">Name</label>
      <input type="text" id="name" name="name" placeholder="Enter your first name here">
    </li>
     <li>
      <label for="email">Email</label>
      <input type="email" id="email" name="email" placeholder="Enter your email here">
    </li>
     <li>
      <label for="message">Message</label>
      <textarea rows="6" id="message" name="message" placeholder="Enter your message here"></textarea>
    </li>
    <label for="submit"><input class="button" type="submit" id="submit"></label>
    </li>
  </ul>
</form>
  <div class="footer">
    <p class="footer-text">“ Think of your workouts as important meetings…”</p>
    </div>
  </div>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>


              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;1,100&display=swap');

*{
  box-sizing: border-box;
}

body{
  font-family: 'Poppins', sans-serif;
  margin: 5% 0 0;
  background-color: #f5f4e8;
}
#nav-bar{
  display:flex;
  overflow:hidden;
  background-color: #d8b9c3;
  justify-content: center;
  position: fixed;
  top: 0;
  left:0;
  right:0;
  width: 100%;
}

img{
  width: 100%;
  height: 300px;
  margin: 0 auto;
}

.slogan{
  text-align:center;
  font-style:italic;
  color: #d8b9c3;
}

h1, h2{
  text-transform: uppercase; 
}
.nav-link{
  text-decoration: none;
  padding: 20px;
  color: #fff;
  display: block;
  float: left;
  font-family: 'Poppins', sans-serif;  
}

.nav-link:hover{
  color:#000;
}

.container{
  display: block;
  margin: 0 auto;
  max-width: 100%;;
  text-align: center;
}
#workouts{
  text-align: center;
}

.workout{
  display: grid;
  width:100%;
  margin: 0 auto;
  grid-template-areas:
    "workout-1 workout-2 workout-3"
}

.card {
    width: 90%;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }

.top-text{
  font-size: 32px;
}

.footer-text{
  padding: 30px;
  color: #fff;
  text-size: 30px;
}

#video{
  width: 100%;
  height: 400px;
}

@media only screen and (max-width: 600px) {
  #video{
    height: 200%;
    margin: 0 auto;
  }
  h1, h2{
    font-size: calc(1em + 1vw);
  }
  .top-text{
    font-size: calc(1em + 1vw);
  }
}
.flex {
  max-width: 80%;
  margin: 0 auto;
}

.flex li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.flex > li:not(:last-child) {
  margin-bottom: 20px;
}

.flex li label,
.flex li p {
  padding: 8px;
  font-weight: 300;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.flex > li > label,
.flex li p {
  flex: 1 0 120px;
  max-width: 220px;
}
 
.flex > li > label + * {
  flex: 1 0 220px;
}

.button {
  margin-left: auto;
  padding: 8px 16px;
  border: none;
  background: #d8b9c3;
  color: #f2f2f2;
  text-transform: uppercase;
  letter-spacing: .09em;
  border-radius: 2px;
  width: 20%;
}

.flex li p {
  margin: 0;
}

.flex li textarea, 
.flex li input {
  padding: 15px;
  border: none;
}

.footer{
  background-color: #d8b9c3;
  margin:0 auto;
}

hr{
  width: 20%;
}
              
            
!

JS

              
                
              
            
!
999px

Console