-1
Colleagues.
I’ve taken over a project now with a ready-made structure, but I’m taking a beating with the site’s css. When another room is included in this project, the Divs are not aligned in 3. See:
The HMTL/PHP code:
while($jmSeg = mysqli_fetch_object($sqlSeg)){ ?>
<div class="hr-corpo">
<div class="hr-container-campos">
<p class="hr-container-campos-sala">SALA <?php echo $jmSeg->sala; ?></p> <!-- SALA 01 -->
<?php
$sqlI = mysqli_query($conecta,"SELECT * FROM `horarios` WHERE dia = 'Segunda e Quarta' and sala = '".$jmSeg->sala."' and status = '1' ORDER BY hora");
while ($horasI = mysqli_fetch_object($sqlI)) {
echo"<div class=\"hr-campos\">
<p><span class=\"hr\">".utf8_encode($horasI->hora)."</span><span class=\"hr-atividade\">".$horasI->atividade."</span><br/><span class=\"hr-professor\">Prof. ".$horasI->professor."</span></p>
</div>";
}
?>
</div>
</div>
</div>
<?php } ?>
CSS:
.hr-corpo{
width:30%; margin:0% 1.666666666666667% 4% 1.666666666666667%; background:rgba(0,0,0,0.0); min-height:10px; display:inline-block; padding:0%; float:left;}/*CORPO DA AGENDA*/
.hr-container-campos-sala{
font-size:0.7em;}
If I understand correctly, you would like the Divs to be aligned in 3 columns and for example the div4 to be below the div1 and so on?
– Will Ramos
Hello, Will Ramos. Exactly. I’m sorry I can not pass more information, because as I said in the post, this project was already ready and when I took over, I realized that this occurs when includes more rooms.
– user24136