* {
margin: 0px;
padding: 0px;
font: 16px 'Source Sans Pro', sans-serif;
border: none;
box-sizing: border-box;
}
html, body {
background: #2E706C;
text-align: center;
width: 50%;
height: 50%;
margin: 5rem;
bottom: 2rem;
right: 2rem;
}
html {
display: table;
}
body {
display: table-cell;
vertical-align: middle;
}
#quiz {
margin: -44px 50px 0px;
position: relative;
width: calc(100% - 100px);
}
#quiz h1 {
color: #FAFAFA;
font-weight: 600;
font-size: 36px;
text-transform: uppercase;
text-align: left;
line-height: 44px;
}
#quiz button {
float: left;
margin: 8px 0px 0px 8px;
padding: 4px 8px;
background: #9ACFCC;
color: #00403C;
font-size: 14px;
cursor: pointer;
outline: none;
}
#quiz button:hover {
background: #36a39c;
color: #FFF;
}
#quiz button:disabled {
opacity: 0.5;
background: #9ACFCC;
color: #00403C;
cursor: default;
}
// Array of all the questions and choices to populate the questions. This might be saved in some JSON file or a database and we would have to read the data in.
var all_questions = [{
question_string: "What color is the sky?",
choices: {
correct: "Blue",
wrong: ["Pink", "Orange", "Green"]
}
}, {
question_string: "Which of the following elements aren’t introduced in HTML5?",
choices: {
correct: "
",
wrong: ["
", "