eaglelandsonce commited on
Commit
ceefb5d
·
verified ·
1 Parent(s): 49ceb0a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +13 -7
index.html CHANGED
@@ -66,14 +66,16 @@
66
  font-weight: bold;
67
  color: #0078D4;
68
  }
 
 
 
 
 
69
  .answer-btn {
70
- margin: 10px;
71
- padding: 15px 20px;
72
  font-size: 18px;
73
  cursor: pointer;
74
- display: block;
75
- width: 100%;
76
- max-width: 300px;
77
  text-align: center;
78
  border: 2px solid #005a9e;
79
  border-radius: 5px;
@@ -171,7 +173,7 @@
171
  questionDisplay.innerHTML = `
172
  <h2>${categories[category]} for $${(difficulty + 1) * 100}</h2>
173
  <p>${question.q}</p>
174
- ${answerHtml}
175
  `;
176
  cardElement.classList.add('disabled');
177
  cardElement.style.backgroundColor = '#cccccc';
@@ -184,7 +186,11 @@
184
  const isCorrect = selectedAnswer === question.correct;
185
  const value = (difficulty + 1) * 100;
186
 
187
- document.querySelectorAll('.answer-btn').forEach(btn => btn.classList.add('disabled'));
 
 
 
 
188
 
189
  if (isCorrect) {
190
  score += value;
 
66
  font-weight: bold;
67
  color: #0078D4;
68
  }
69
+ .answer-container {
70
+ display: flex;
71
+ justify-content: center;
72
+ margin-top: 20px;
73
+ }
74
  .answer-btn {
75
+ margin: 5px;
76
+ padding: 10px 15px;
77
  font-size: 18px;
78
  cursor: pointer;
 
 
 
79
  text-align: center;
80
  border: 2px solid #005a9e;
81
  border-radius: 5px;
 
173
  questionDisplay.innerHTML = `
174
  <h2>${categories[category]} for $${(difficulty + 1) * 100}</h2>
175
  <p>${question.q}</p>
176
+ <div class="answer-container">${answerHtml}</div>
177
  `;
178
  cardElement.classList.add('disabled');
179
  cardElement.style.backgroundColor = '#cccccc';
 
186
  const isCorrect = selectedAnswer === question.correct;
187
  const value = (difficulty + 1) * 100;
188
 
189
+ // Disable all answer buttons
190
+ document.querySelectorAll('.answer-btn').forEach(btn => {
191
+ btn.disabled = true;
192
+ btn.classList.add('disabled');
193
+ });
194
 
195
  if (isCorrect) {
196
  score += value;