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

              
                <script src = 'https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script>

<main>
  <div class = 'spacer'></div>
  
  <header>
    <h1 id = 'title'>
      Contact Me
    </h1>
    <p id = 'description'>
      fill in the info below to reach out
    </p>
  </header>
  
  <article>
    <section>
      <h2>
        Need to know where we're located?
      </h2>
      <p>
        123 Example Rd.<br/>
        Rochester Hills, MN<br/>
        12345
      </p>
    </section>
    
    <section>
      <h2>
        Need our Email instead?
      </h2>
      <p>
        Example123@gmail.com
      </p>
    </section>
    
    <section>
      <h2>
        Try giving us a call maybe?
      </h2>
      <p>
        (123) 456-7890<br/>
      </p>
    </section>
    
    <section>
      <h2>
        Feeling lazy?
      </h2>
      <p>
        Don't really feel like opening up another <br/>
        browser window? I don't blame ya, Just fill <br/>
        out our form to the right and we'll take care<br/>
        of all the hard work and reach out to you.
      </p>
    </section>
  </article>
  
  <form id = 'survey-form'>
    <fieldset id = 'personal-info'>
    
      <label for = 'name' id = 'name-label'>name:</label>
        <input type = 'text' id = 'name' name = 'name' placeholder = 'Full Name' required><br/>
     <label for = 'email' id = 'email-label'>email:</label>
       <input type = 'email' id = 'email' name = 'email-address' placeholder = 'Email Address' required><br/>
     <label for = 'age' id = 'number-label'>Age:</label>
       <input type = 'number' id = 'number' name = 'number' placeholder = 'Age' min = '1' max = '100' required>
      
    </fieldset>
    
    <fieldset id = 'dropdown-info'>
      
      <label for = 'states-label' id = 'states'>state: </label><br/>
        <select id = 'dropdown'>
          <option value="AL">Alabama</option>
          <option value="AK">Alaska</option>
          <option value="AZ">Arizona</option>
          <option value="AR">Arkansas</option>
          <option value="CA">California</option>
          <option value="CO">Colorado</option>
          <option value="CT">Connecticut</option>
          <option value="DE">Delaware</option>
          <option value="DC">District Of Columbia</option>
          <option value="FL">Florida</option>
          <option value="GA">Georgia</option>
          <option value="HI">Hawaii</option>
          <option value="ID">Idaho</option>
          <option value="IL">Illinois</option>
          <option value="IN">Indiana</option>
          <option value="IA">Iowa</option>
          <option value="KS">Kansas</option>
          <option value="KY">Kentucky</option>
          <option value="LA">Louisiana</option>
          <option value="ME">Maine</option>
          <option value="MD">Maryland</option>
          <option value="MA">Massachusetts</option>
          <option value="MI">Michigan</option>
          <option value="MN">Minnesota</option>
          <option value="MS">Mississippi</option>
          <option value="MO">Missouri</option>
          <option value="MT">Montana</option>
          <option value="NE">Nebraska</option>
          <option value="NV">Nevada</option>
          <option value="NH">New Hampshire</option>
          <option value="NJ">New Jersey</option>
          <option value="NM">New Mexico</option>
          <option value="NY">New York</option>
          <option value="NC">North Carolina</option>
          <option value="ND">North Dakota</option>
          <option value="OH">Ohio</option>
          <option value="OK">Oklahoma</option>
          <option value="OR">Oregon</option>
          <option value="PA">Pennsylvania</option>
          <option value="RI">Rhode Island</option>
          <option value="SC">South Carolina</option>
          <option value="SD">South Dakota</option>
          <option value="TN">Tennessee</option>
          <option value="TX">Texas</option>
          <option value="UT">Utah</option>
          <option value="VT">Vermont</option>
          <option value="VA">Virginia</option>
          <option value="WA">Washington</option>
          <option value="WV">West Virginia</option>
          <option value="WI">Wisconsin</option>
          <option value="WY">Wyoming</option>
        </select>
      
    </fieldset>
    
    <fieldset id = 'checkbox-info'>
      
      <label for = 'preferred-contact-label' id = 'contact'>preferred method of contact: </label><br/>
        <input class = 'checkbox' type = 'checkbox' name = 'contact' value = 'call' checked> call
        <input class = 'checkbox' type = 'checkbox' name = 'contact' value = 'text' checked> text
        <input class = 'checkbox' type = 'checkbox' name = 'contact' value = 'email' checked> email
      
    </fieldset>
    
    <fieldset id = 'radio-button-info'>
      
      <label for = 'review-label' id = 'review'>Did we answer all of your questions? </label><br/>
        <input type = 'radio' name = 'review' value = 'yes' checked> yes
        <input type = 'radio' name = 'review' value = 'no'> no
      
    </fieldset>
    
    <fieldset id = 'textarea-info'>
      
      <label for = 'textarea-label' id = 'additional-info'>If not, please feel free to leave us a message here: </label><br/>
        <textarea id = 'message' name = 'additional-info' placeholder = 'type a message in 200 characters or less'></textarea>
      
    </fieldset>
    
    <button type = 'submit' id = 'submit'>submit</button> 
  </form>
</main>
              
            
!

CSS

              
                
:root {
  --eggshell-white: rgb(240, 234, 214); /* EggShell White */
  --beautiful-blue: rgb(0, 70, 100); /* Beautiful Blue */
  --gradient: repeating-linear-gradient(135deg, rgb(0, 50, 100) 0%, rgba(0, 50, 100, 0.7) 20%, white 20%, white 100%); /* Soft Blue */
}

body::-webkit-scrollbar {
  width: 25px;
  background: white;
  cursor: pointer;
}

body::-webkit-scrollbar-thumb {
  background: rgba(0, 70, 100, .9);
  border: 2px solid white;
  overflow: visible;
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 70, 100, .8);
}

body::-webkit-scrollbar-thumb:active {
  border: 3px solid white;
}

body {
  position: absolute;
  user-select: none;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

main {
  position: relative;
  background: var(--gradient);
  width: 100%;
  height: 1150px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 80px 300px 770px;
  grid-template-areas:
    "spacer spacer"
    "title title"
    "article form";
}

.spacer {
  grid-area: spacer;
}

header {
  grid-area: title;
  text-align: center;
  padding-top: 75px;
  line-height: 15px;
  border-top: 2px solid var(--eggshell-white);
  border-bottom: 2px solid var(--eggshell-white);
  color: var(--eggshell-white);
  background: url('https://mdfpainting.com/wp-content/uploads/2012/03/blog-header-1920-x-300.jpg');
  background-size: 100% 300px;
  text-shadow: 0 0 15px black;
}

header h1 {
  font-size: 65px;
}

header p {
  font-size: 30px;
}

article {
  grid-area: article;
  color: var(--beautiful-blue);
  margin: 10px 0;
  padding-top: 50px;
  text-align: center;
  border-right: 2px solid rgba(0, 70, 100, .6);
}

article h2 {
  font-size: 28px;
  margin-bottom: -10px;
}

article p {
  font-size: 20px;
  margin-bottom: 40px;
}

form {
  grid-area: form;
  text-align: center;
  color: var(--beautiful-blue);
  padding-top: 50px;
  font-size: 20px;
}

input[type = text], input[type = email], input[type = number], #dropdown, button{
  width: 400px;
  height: 30px;
  margin: 10px;
  padding: 5px;
  font-size: 20px;
  text-align: left;
  color: var(--beautiful-blue);
  border: 2px solid var(--beautiful-blue);
}

#dropdown-info {
  margin-top: -40px;
}

#dropdown {
  width: 415px;
  height: 43px;
}

#dropdown:hover {
  cursor: pointer;
}

input::placeholder {
  color: var(--beautiful-blue);
}

textarea {
  width: 400px;
  height: 150px;
  resize: none;
  font-size: 16px;
  padding: 10px;
  border: 2px solid var(--beautiful-blue);
}

textarea:focus, input[type = text]:focus, input[type = email]:focus, input[type = number]:focus {
  background-color: rgba(0, 70, 100, .5);
  color: var(--eggshell-white);
  border: none;
}

textarea::placeholder {
  color: var(--beautiful-blue);
  font-size: 16px;
  text-align: center;
}

input[type = checkbox], input[type = radio] {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  cursor: pointer;
}

fieldset {
  border: none;
}

#personal-info label, #dropdown-info label{
  display: none;
}

button {
  border: 2px solid var(--beautiful-blue);
  height: 40px;
  background-color: white;
  font-weight: bold;
  font-size: 22px;
  text-align: center;
}

button:hover {
  cursor: pointer;
  color: var(--eggshell-white);
  background-color: var(--beautiful-blue);
}












@media (max-width: 1024px) {
  
  main {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 0 300px 600px 750px;
  grid-template-areas:
    "spacer spacer"
    "title title"
    "article article"
    "form form";
    background: white;
  }
  
  header {
    background: url('https://ucarecdn.com/cd7b5ab3-6f07-4c02-b64d-2d052552ad88/-/resize/1024x/-/crop/1024x300/0,0/');
    background-size: 100% 300px;
    box-shadow: none;
  }
  
  article {
    border-right: none;
  }
  
}
              
            
!

JS

              
                  
$(window).scroll(headerFade);

function headerFade() {
  if($(this).scrollTop() > 250) {
    $('header').css({
      'opacity': '0',
      'transition': '1s',
    })
  } else {
      $('header').css({
        'opacity': '1',
        'transition': '.7s',
      })
  }
}

              
            
!
999px

Console