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

              
                
<div id="container">
  <header>
    <h1 id="title">Survey Form</h1>
    <p id="description">This study to learn more about the personality of the most populous companion animal, the domestic cat.</p>
  </header>
  <form id ="survey-form">
    <div class="form-field">
      <label id="name-label" for="name">Name<span class="required">(required)</span></label>
      <input name="name" class="form-control" id="name" type="text" placeholder="Enter your name" required/>
    </div>
    <div class="form-field">
       <label id="email-label" for="email">Email<span class="required">(required)</span></label>
       <input id="email" type="email" name="email" class="form-control" placeholder="Input your Email" required/>
    </div>
    <div class="form-field">
      <label id="number-label" for="number">Age<span class="required">(required)</span></label>
      <input id="number" type="number" min="13" max="1000" name="Phone number" class="form-control" placeholder=" Input your age, not your cat age" required/>
    </div>
    <div class="form-field">
      <p>Country of Residence<br><span class="required"> In what country do you currently live?
Participants in all countries are welcome.</span></p>
      <select id="dropdown" class="form-control" name="residence"  required>
       <option disabled selected value>Select</option>
       <option>USA</option>
       <option>Australia</option>
       <option>Canada</option>
       <option>Europe</option>
        <option>Other (specify below)</option>
      </select>
  <label class="other">Other <span class="required">(please specify)</span></label><input class= "form-control" type="text">
    </div>
    <div class="form-field">
      <p>How many cats do you currently have</p>
      <select id="cats-qty" class="form-control" name="cats qty"  required>
       <option disabled selected value>Select</option>
       <option>1</option>
       <option>2</option>
       <option>3-5</option>
        <option>5 or more</option>
      </select>
    </div> 
    <div class="form-field">
      
      <p>Cat's sex:</p>
      <label><input name="cats-sex" value="Male" class="input-radio" type="radio" />Male</label>
      <label><input name="cats-sex" value="Female" type="radio" class="input-radio"/>Female</label>
    </div>
    <div class="form-field">
      <p>Is this cat spayed or neutered?</p>
      <label><input name="spayed" class="input-checkbox" type="radio" value="Yes, my cat is spayed or neutered" />Yes</label>
      <label><input name="spayed" class="input-checkbox" type="radio" value="No, my cat not spayed or neutered"  />No</label>
    </div>
    <div class="form-field">
      <p>Your cat's favorite food?</p>
      <label><input name="fish" class="input-checkbox" type="checkbox" value="Fish" />Fish</label>
      <label><input name="meat" class="input-checkbox" type="checkbox" value="Meat"  />Meat</label>
      <label><input name="vegetables" class="input-checkbox" type="checkbox" value="Vegetables"  />Vegetables</label>
</div>
    <div class="form-field">
      <p>Cat’s current age (if exact age is unknown, please estimate):</p>
      <select id="cats-age" class="form-control" name="cats age"  required>
       <option disabled selected value>Select one</option>
       <option>Kitten (2-6 months)</option>
       <option>Adolescent (6-12 months)</option>
       <option>Young adult (1-3 years)</option>
       <option>Mature adult (3-9 years)</option>
       <option>Senior adult (10+ years)</option>
      </select>
    </div> 
    <div class="form-field">
      <p>Any other information about your cat</p>
      <textarea
        id="comments"
        class="input-textarea"
        name="comment"
        placeholder="Enter your information here..."
      ></textarea>
    </div>
    <div class="form-field">
      <button type="submit" id="submit" class="button">
        Submit
      </button>
    </div>
  </form>
</div><!--End Container-->

              
            
!

CSS

              
                /*Normalize*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*Elements*/
html {
  font-size:15px;
}
body{
  font-family: Arial, Sans-Serif;
  font-size: 1rem;
  line-height: 1.2;
  color: rgb(93,107,105);
  margin: 0;
}
h1 {
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
h2 {
  font-size: 2.25rem;
  margin-bottom: 15px;
  text-align: center;
}
p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
/*background and Header*/
#container {
  width: 100%;
  min-height: 100vh;
  background-color: hsl(0,0%,94%);
  background-image: url(https://res.cloudinary.com/dmcuxmfq8/images/v1652095960/wordpress/lucas-van-oort-e8rfpslbbw-unsplash/lucas-van-oort-e8rfpslbbw-unsplash.jpg?_i=AA);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 65% 25%;
}

#description {
margin: 0 auto;
margin-bottom:15px;
text-align: center;
color: #818181;
}

/*Form styles*/
#survey-form {
  margin: auto;
  background-color: rgba(223,217,193,0.9);
  border-radius: 5px;
  box-shadow: 2px 2px 9px 3px rgba(0,0,0,0.21);
}

label {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.other {
  padding-top: 0.8rem;
}

span.required {
  font-size: 0.9rem;
  padding-left: 5px;
}

input,
button,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.form-field {
  margin: 0 auto 1.25rem auto;
  padding: 0.25rem;
}

.form-control {
  display: block;
  width: 100%;
  height: 2.375rem;
  padding: 0.375rem 0.75rem;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-radio, .input-checkbox {
  display: inline-block;
  margin-right: 0.625rem;
  min-height: 1.25rem;
  min-width: 1.25rem;
}

.input-textarea {
  min-height: 120px;
  width: 100%;
  padding: 0.625rem;
  resize: vertical;
  border:none;
  border-radius: 4px;
}

.button {
  display: block;
  padding: 0.75rem;
  background: hsl(171,7%,39%) ;
  color: hsl(0,0%,94%) ;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
/*--Mobile version--*/

@media (min-width: 576px) {
  #survey-form, #description {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  #survey-form, #description {
    max-width: 720px;
  }
  .button {
    width: 25%;
  }
}

@media (min-width: 350px) {
  #survey-form {
    padding: 1.6rem;
  }
  #container {
    padding: 50px 5px 120px 5px;
  }
}

@media (max-width: 768px) {
  #container {
    background-image: url(https://res.cloudinary.com/dmcuxmfq8/images/w_1707,h_2560/v1652096397/wordpress/laura-chouette-g6ny4dvhle0-unsplash/laura-chouette-g6ny4dvhle0-unsplash.jpg?_i=AA);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  }
}

              
            
!

JS

              
                //www.piunoff.eu - WordPress dev//

              
            
!
999px

Console