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="h1-container">
<h1 id="title" class="header">JeDIDIAH VOTING SYSTeMS</h1>
  </header>
<div id="cover-all">
  <h2 class="survey-title">Survey Form</h2>
      <p id="description">By participating in this survey, you'd be helping us assess the perceived implication of technology adoption on elections in Africa. Thank you!</p>
<form id="survey-form">
  <div class="form-group">
  <label id="name-label" for="name">Name</label>
  <input id="name" type="text" name="fullname" placeholder="Full name, surname first" required class="form-control">
  </div>
  <div class="form-group">
  <label id="email-label" for="email">Email</label>
  <input id="email" type="email" name="email" placeholder="e.g. love@mercy.com" required class="form-control">
  </div>
  <div class="form-group">
    <label id="number-label" for="number">Age</label>
  <input id="number" type="number" name="age" min="16" max="120" placeholder="e.g. 23" required class="form-control">
  </div>
  <div id="select-ops">
  <label for="dropdown">Have you voted before?</label>
  <select id="dropdown" name="vote-question">
    <option value="yes">Yes</option>
        <option value="no">No</option>
   </select>
  </div>
    <fieldset>
      <legend><h3>Problems of Elections in Africa</h3></legend>    
      <p>Which do you consider the biggest problem of elections in Africa? <span class="span-style">(Please select <strong>ONE</strong> option)</span></p>
      <div class="box-group">
      <label for="high-cost-of-elections"><input id="high-cost-of-elections" type="radio" name="election-problem" value="high cost of elections" class="input-control">High Cost of Elections</label>
      </div>
      <div class="box-group">
      <label for="election-rigging"><input id="election-rigging" type="radio" name="election-problem" value="election rigging" class="input-control">Election Rigging</label>
      </div>
      <div class="box-group">
        <label for="low-capacity-building"><input id="low-capacity-building" type="radio" name="election-problem" value="low capacity building" class="input-control">Low Capacity Building</label>
        </div>
        <div class="box-group">
        <label for="political-instability"><input id="political-instability" type="radio" name="election-problem" value="political-instability" class="input-control">Political Instability</label>
        </div>
        <div class="box-group">
        <label for="foreign-interference"><input id="foreign-interference" type="radio" name="election-problem" value="foreign-interference" class="input-control">Foreign Interference</label>
        </div>
        </fieldset>
  <fieldset>
    <legend><h3>Security Requirement for Voting</h3></legend>
    <p>Which of the following security requirements of voting systems will benefit from adoption of technology in voting?<span class="span-style"> (Select <span id="inner-span">all that apply</span>)</span></p>
    <div class="box-group">
    <label for="ballot-secrecy"><input id="ballot-secrecy" type="checkbox" name="security-requirement" value="ballot secrecy" class="input-control"><span class="req-tip">Ballot Secrecy<span class="tooltiptext">Nobody should know how you voted</span></span></label>
    </div>
    <div class="box-group">
    <label for="integrity"><input id="integrity" type="checkbox" name="security-requirement" value="integrity" class="input-control"><span class="req-tip">Integrity<span class="tooltiptext">Outcome of the election matches voter intent</span></span></label></div>
    <div class="box-group">
    <label for="voter-authentication"><input id="voter-authentication" type="checkbox" name="security-requirement" value="voter authentication" class="input-control"><span class="req-tip">Voter Authentication<span class="tooltiptext">Only
authorized voters should be able to vote, & once</span></span></label>
</div>
<div class="box-group">
        <label for="enfranchisement"><input id="enfranchisement" type="checkbox" name="security-requirement" value="enfranchisement" class="input-control"><span class="req-tip">Enfranchisement<span class="tooltiptext">All
  authorized voters should have the opportunity to vote.</span></span></label>
  </div>
<div class="box-group">
      <label for="availability"><input id="availability" type="checkbox" name="security-requirement" value="availability" class="input-control"><span class="req-tip">Availability<span class="tooltiptext">The system should be able to accept votes on schedule during election day and produce results in a timely manner.</span></span></label>
      </div>
    </fieldset>
  <div id="text-area-group">
      <p>If you have further comments or suggestions, please indicate below.</p>
    <label for="comments">
    <textarea id="comments" name="aditional-text" placeholder="Please provide additional comments here" class="text-area-ops"></textarea>
    </label>
  </div>
  <div class="form-group">    
  <button id="submit" type="submit" class="button-style">Submit</button>
  </div>
    </form>
</div>

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

CSS

              
                #h1-container{
width:80%;
  border: 0.3rem hidden rgba(0,0,51,1);
  margin:auto;
  background-image:linear-gradient(to right,rgba(204,163,0,0.2),rgba(0,153,51,0.2));
}
.header {
  font-family: 'Cormorant Unicase', serif;
  font-size:3rem;
  color:rgba(0,0,51,1);
  padding: 0 0.6rem;
  margin: 0.85rem 0.85rem;
   }
.survey-title{
  text-align:center;
}
#cover-all{  background:rgba(255,255,255,0.7);
  width:50vmax;
  margin:1.5rem auto 0 auto;
  padding:0 1.5rem 1rem 1.5rem;
  border:15px hidden blue;
    }
p{
  font-size:1.25rem;
  margin-top:0;
  padding-top:0.1rem;
  text-align:justify;
}
h3{
  margin-top:1.5rem;
  margin-bottom:1.2rem;
}
.span-style{
  font-size:0.8rem;
  font-style:italic;
}
#inner-span{
  text-decoration:underline;
}
body{
  background-image:linear-gradient(to right,rgba(204,163,0,0.4),rgba(0,153,51,0.4));
font-family: monospace;
  }
h2,h3{
  color:rgba(0,0,51,1);
  font-size:1.5rem;
}
#title{
  text-align:center;
  font-weight:600;
}
#description{
  text-align: justify;
}
#select-ops{
  display:flex;
  font-size:1.25rem;
  margin-top: 1rem;
  padding-top: 0.2rem;
}
.form-group{
  display:flex;
  margin: 0 auto 0.5em auto;
  padding-top: 0.2em;
}
.form-group label{
  font-size:1.25rem;
  width:5rem;
  padding-top:0;
  padding-bottom:0.5rem;
color:rgba(0,0,51,1);
}
.form-control{
  width:100%;
  height: 1.25rem;
  padding: 0.5rem 0 0.5rem 0.3rem; 
  border:hidden;
  border-color:gray;
  box-shadow: 0.2rem 0.2rem 0.6rem;
  font-size:1rem;
}
.box-group{
  display:flex;
  margin-right: 1rem;
  }
.box-group label{
  width:100%;
  margin-top:0;
  font-size:0.925rem;
    padding:0.5rem 0 0.5rem 0;
  color:rgba(0,0,51,1);
}
.input-control{
  margin-right: 1rem;
  height: 1rem;
  width: 1rem;
  padding:0.5rem 0;
}
#text-area-group{
  margin:1rem auto 1rem auto;
}
.text-area-ops{
  width:100%;
  height:200px;
  resize:none;
  padding:0.2rem;
  font-size:1rem;
  border:0.12rem outset rgba(0,0,51,1);
}
.button-style{
  width:100%;
background-image:linear-gradient(to right,rgba(204,163,0,0.4),rgba(0,153,51,0.2));
  cursor:pointer;
  font-size:1.75rem;
  padding:0.2rem;
  color:rgb(0,38,77);
border:0.25rem hidden rgba(0,0,51,1);
}
.req-tip{
  position:relative;
  display:inline-block;
  border-bottom: 1px dotted blue;
 }
.tooltiptext {
  visibility: hidden;
  width: 10rem;
  height:auto;
  background-color: lightgray;
  color: black;
  text-align: justify;
  font-size:0.8rem;
  padding-top: 0;
  margin-top:0;
   position: absolute;
  z-index: 1;
}
.sec-req-align{
  text-align:right;
}
.req-tip:hover .tooltiptext{
  visibility: visible;
}
.req-tip .tooltiptext {
  top: -5px;
  left: 105%;
}
  @media screen and (max-width:480px){.form-group, #select-ops {
    display:flex;
    flex-direction:column;
  }
  p{
    font-size:1rem;
    }
  .header,h2,h3 {
    font-size:1.5rem;}
    .tooltiptext {
      display:none;
    }
    .req-tip{
      border-bottom:none;
  }
    #cover-all{
      width:auto;
}
    }
              
            
!

JS

              
                
              
            
!
999px

Console