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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!-- start of the main container  -->
<div id="main" class="main-container">
  <div class="first-row">
    <h1 id="title">Find a Fluffy Buddy</h1>
    <p id="description">Survey helping Samoyed dogs reach an owner</p>
    <p class="top-text">Be My Best Friend</p>
  </div>
  <div class="second-row">
    <form class="form-container" action="#" id="survey-form">

      <h2>Become a DOG owner</h2>
      <div class="info-flex">
        <label id="name-label" for="name"><span>*</span> Name</label>
        <input placeholder="Enter Your Name" type="text" id="name" required>

        <label id="email-label" for="email"> <span>*</span> Email</label>
        <input placeholder="Enter Your Email" type="email" id="email" required>

        <label id="number-label" for="number"><span>*</span> Age</label>
        <input placeholder="Enter Your Age" id="number" type="number" required min="0" max="125">
      </div>
      <div class="f-wrapper">
        <div class="flexbox-radio">
          <p>Would you take good care of the dog??</p>
          <div class="radio-buttons">
            <label for="radio-btn">Yes!</label>
            <input id="radio-btn1" type="radio" value="Yes" name="butn-radio">
          </div>
          <div class="radio-buttons">
            <label for="radio-btn2">No.</label>
            <input id="radio-btn2" type="radio" value="Yes" name="butn-radio">
          </div>
        </div>
      </div>
      <div class="f-wrapper">
        <div class="checkbox-flex">
          <p> Where would the dog sleep?? </p>
          <div class="inline">
            <label for="unique2">Couch </label>
            <input id="unique1" type="checkbox" name="randomvalue" value="first">
          </div>
          <div class="inline">
            <label for="unique2">Doggy spot  </label>
            <input id="unique2" type="checkbox" name="randomvalue" value="second">
          </div>
          <div class="inline">
            <label for="study">Bed </label>
            <input id="unique3" type="checkbox" name="randomvalue" value="third">
          </div>
  <!--   end checkbox flex       -->
        </div> 
      </div>

      <div class="dropdown-flex">
        <label for="dropdown">How many dogs do you currently have?</label>
        <select id="dropdown">
          <option value="none">None</option>
          <option value="One">One</option>
          <option value="Two">Two</option>
          <option value="more than 2">More than two </option>
        </select>
      </div>

      <p>Would you take good care of him?</p>

      <div class="textarea-flex">
        <textarea rows="5" cols="33">
              
            </textarea>
        <button id="submit" type="submit">Submit</button>
      </div>
    </form>
  </div>
</div>
<!-- end of the main container  -->
              
            
!

CSS

              
                * {
    box-sizing: border-box;
}

body {
   margin: 0;
   padding: 0;
   width: 100%;
}

.inline {
  display: inline-block;
  margin-bottom: 1rem;
  
}

input,
label {
  margin: 0;
}


/* typography  */

h1,
h2 {
  font-family: 'Libre Baskerville', serif;
  text-align: center;

}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-top:  1rem;
}

h1 + p {
  margin: 0;
}

#description,
.top-text {
  text-align: center;
}

#description {
  color: #F18119;
  margin-bottom: 0.7rem;
}

.top-text {
  order: -1;
  color: #cef5d9;
  margin-top: .5em;
  text-transform: uppercase;
}

span {
  color: #f23022;
}


/* Layout  */
.main-container {
 width: 100%;
}




.first-row {
  margin: 0;
  padding: 0 .5em 2em;
  width: 100%;
  background-color: brown;
  background-image: url(https://wallpapercave.com/wp/kb5sKkG.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.second-row {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: #f8f8f8;
}

.info-flex,
.dropdown-flex,
.textarea-flex,
.flexbox-radio,
.checkbox-flex{
  width: 100%;
  display: flex;
  flex-direction: column;
  
}

.checkbox-flex,
.flexbox-radio {
  align-items: flex-end;
}

.f-wrapper {
  align-items: center;
  justify-content: center;
  display: flex;
  flex-flow: row wrap;
}

.info-flex input {
  padding: .5em 1em;
  text-align: center;
  border: 1px solid #404040;
  border-radius: 3px;
}

.first-row >*,
.second-row >* {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}




/* =================
   media queries 
   ================= */

@media (min-width:530px) {
  body {
    font-size: 1.125rem;
    display: flex;
  }
  
  .main-container {
    display: flex;
  }
  
  h1 {
    font-size: 3.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  #description {
    font-size: 1.1rem;
  }
  
  .first-row,
  .second-row{
    width: 50%;
    min-height: 100vh;
  }
  
  .second-row {
    display: flex;
    flex-direction: column;
    margin: 0 .5rem;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console