-2
Talk to me, baby?
I wonder if there is some way to center an image dependent on another div (that would be text).
For example: I will create a div and put an image (icon) on the left side and a text on the right side.
My intention is to put more text inside this div, but whenever I put more text or shot, I have to center the image according to the text "Manually" changing the margin-top so that it looks visually beautiful! I wanted to know how to "center" the image vertically on inside the div.
.tabel{width: 100%;height: 90%;}
#espeesquertop {width: 60%;height:80%;margin-top: 5%;display:display: inline-block;}
#espeesquertop img{width:15%;margin-top: 25%;margin-left: 3%;display:}
#cont1 {float:right;width:70%;margin-right:5%;}
#cont1 p{font-size: 1em;line-height: 170%;font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;}
#cont1 h2{margin-left:5%;}
<div class="especi">
<div class="tabel">
<h2>Bem vindos ao Egito</h2>
<div id="espeesquertop">
<img src="https://image.flaticon.com/icons/svg/3113/3113259.svg" alt="">
<div id="cont1">
<h2>Egito 1</h2><br><p>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<br>
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc<br>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<br>
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc<br>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<br>
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc<br>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<br>
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc<br>
</div>
</div><br><br>