I have designed a quiz on html with post php. Everything is fine but i do not know how to make the results in the center of the page. The results are on the left What's the best way to do this? I'm new to PHP. I have tried
results {
text-align: center;
}
and
.results
{
text-align: center;
}
echo "<div id='results'>$totalCorrect / 5 correct</div>"; ?>
</div>
</div>
</div>
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">How did you do?
</h2>
<hr>
<hr class="visible-xs">
<?php
$answer1 = $_POST['question-1-answers'];
$answer2 = $_POST['question-2-answers'];
$answer3 = $_POST['question-3-answers'];
$answer4 = $_POST['question-4-answers'];
$answer5 = $_POST['question-5-answers'];
$totalCorrect = 0;
if ($answer1 == "B") { $totalCorrect++; }
if ($answer2 == "A") { $totalCorrect++; }
if ($answer3 == "C") { $totalCorrect++; }
if ($answer4 == "D") { $totalCorrect++; }
if ($answer5) { $totalCorrect++; }
echo "<div id='results'> $totalCorrect / 5 correct </div>";
?>
</div>
</div>
</div>