2
I would like to know how to fit this element, I would like when the top end the bottom come right down to it. How can I do that?
Here is the html:
<?php
$postagens = timeline($conexao);
foreach($postagens as $time) :
?>
<div class="margem-topo-20 sombra-suave" id="timeline">
<img src="envios/<?=$time['img'];?>" id="time-img" />
<h2><?=$time['titulo'];?></h2>
<p><?=nl2br($time['texto'])?></p>
<a href="http://<?=$time['site'];?>" target="_blank"><?=$time['site'];?></a><br>
<p class="icones icone-olho-aberto margem-topo-5"><span class="margem-esquerda-5"><?=$time['visualizacoes'];?></span></p>
</div>
<?php
endforeach
?>
</section>
Here’s the css code I’m using:
#timeline {
width: 22%;
background-color: #fff9f1;
padding: 10px;
border: 1px solid #fff9f1;
border-radius: 5px;
margin: 5px;
}
#time-flex {
display: flex;
align-items: flex-start;
flex-flow:wrap;
}
Also insert the html in the question, so that it is clearer the structure you are using
– Isac