HTML page code:
<main>
<img src="https://c.tenor.com/rv04dG_HDH0AAAAi/jojo-thonk.gif" alt="Nu se incarca" />
<br>
<br>
<p>O imagine mult mai smechera, si acum este aliniata </p>
<p id="wild">SUNT complet diferit de restul paragrafelor</p>
</main>
CSS code:
main{
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
main > p{
text-align:center;
font-size: 20px;
vertical-align: top;
display: inline-block;
text-align: center;
width: 500px;
}
img {
width: 300px;
height: 300px;
/*padding: 15px;*/
}
.caption {
display: block;
}
I can't seem to align the picture into the center of the page properly, I tried removing the margin of main but I can't get anything to work.
This is how it looks: https://gyazo.com/f948f9f93ee3c448d5879a9c9eca17fb