Salve ragazzi, di solito non mi occupo di questa cosa quindi ho problemi a farla. La pagina di riferimento è questa: https://www.booking-lagodigarda.it/recensioni.php .
codice:
$riccomm = "Select * from commenti;"; $riccommr = mysqli_query($con,$riccomm);
while($rowloc = mysqli_fetch_assoc($riccommr))
{ ?>
<div id ="left">
<img src="images/profile-recensioni.png" alt="recensioni"><br>
<strong><?php echo $rowloc["nome"]; ?></strong><br>
<strong><?php echo $rowloc["email"]; ?></strong><br>
</div>
<div id="right">
<?php
$nomehot = "SELECT nomeHotel FROM lista_hotel,commenti WHERE lista_hotel.idHotel = commenti.idHotel AND
commenti.idHotel =".$rowloc['idHotel'].";";
$ricnomehot = mysqli_query($con,$nomehot);
$rownomehot = mysqli_fetch_assoc($ricnomehot);
?>
<strong><?php echo $rownomehot["nomeHotel"]; ?></strong><br>
<textarea rows="4" cols="100" value=""> <?php echo $rowloc["commento"]; ?></textarea><br><br>
<?php } ?>
</div>
<div class="col"></div>
codice:
#left{ width: 30%;
float: left;
}
#right{
float: left;
width:70%;
/* margin-top: 6px;
margin-bottom: 30px;*/
}
.col { clear: both;}
Qui vedete prima il codice Html/PHP e poi il codice CSS. La prima riga della pagina va bene. Dopo tutto tende a spostarsi verso destra. Come risolvo questo problema?