I am attempting to center a block of text on a webpage and place an image that is centered both horizontally and vertically within the text block. I do not want to use background-image property for this purpose.
Here is my current implementation, but it doesn't seem to be working as expected.
<div style="font-family: Times; font-size: 12pt; width: 400px; position: absolute; z-index:20; margin-left:auto; margin-right:auto; top: 50px;">
<img style="position: absolute; z-index:1; top: 20px; margin-left:auto; margin-right:auto;" src="MyImage.jpg" width="202" height="267" />
<strong>This is my Text. Blah Blah Blah Blah Blah Blah
<br />
Blah Blah Blah Blah Blah Blah
<br />
Retrieved from:<br />
Blah Blah Blah Blah Blah Blah
<br />
Blah Blah Blah Blah Blah Blah
<br />
</div>