Situation
i am an absolute beginner in CSS therefore i am having problems and would like your help. i have created a list of checkboxes, however the values of the checkboxes are populated using the values that are stored in mysql database. The php code for the checkbox looks like this:
<?php
require("user_connection.php");
$q = mysqli_query($connect, "SELECT * FROM `campus`");
while ($line = mysqli_fetch_assoc($q)) {
echo '<input type="checkbox" name="car"
value="'.$line['room'].'">'.$line['room'].'</br>';
}
?>
</br>
</br>
<?php
$q = mysqli_query($connect, "SELECT * FROM `campus_two`");
while ($line = mysqli_fetch_assoc($q)) {
echo '<input type="checkbox" name="car"
value="'.$line['room'].'">'.$line['room'].'</br>';
}
?>
<div id="next"><input type="submit" name="next" Value="next"/></div>
</form>
The problem
i just want to be able to position the checkbox around the middle of my website. there seems to be tons of tutorials online on how to do that easily using CSS, however all those tutorials have checkbox values embedded into html rather than dynamically generated using database like mine.
currently my CSS looks like this
label {
position: absolute;
top: 300px;
right: 700px;
}
input {
position: absolute;
top: 300px;
right: 700px;
}
now this works fine on a normal checkbox with values embedded into html, but my checkboxes are generated using values from database. i want to be able to position the checkboxes as i want in my website, do you guys know how i can solve this issue?
Aucun commentaire:
Enregistrer un commentaire