I wrote HTML to create the content shown in the image below on Safari on iPad. I use relative, positioning, specifying pixels to position the text and images and the size of the overall background and border. However, when this HTML is rendered on Safari for Mac and iPhone, the image position is different and on iPhone, the background and border no longer encapsulates the content.
Any pointers on how to amend my HTML to ensure that at the very least, the rendering is correct on Safari for Mac and iOS would be greatly appreciated please!
My current HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head></head><body><div><p><br /></p></div><div style="border-style:solid;border-width:2px;border-color:rgb(0,0,0);background-color:rgb(255,232,0);width:302px;height:185px"><img style="position:relative;z-index:100;left:126px; top:39px;" src="https://s3.amazonaws.com/signoffmainbucket/8CA8EC1A-C1C5-4390-9FC4-649648AA26C8.jpg" alt="image"/><p style="opacity:1.00;color:rgb(0,0,0);position:relative;margin: -123px 0px 0px 18px;font-family: Helvetica, Helvetica;font-size:14px"><b>John</b></p><br /><br /><br /><br /><p style="opacity:1.00;color:rgb(0,0,0);position:relative;margin: 0px 0px 0px 18px;font-family: Helvetica, Helvetica;font-size:14px"><b>XYZ Company</b></p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>
This is the content generated as rendered correctly by the HTML above on an iPad:

This should work:
You could also try using this example(html 4 transitional dtd):