Hi guys,
I have developed some code that generates a short HTML file, this file is then navigated to in a WebBrowser object in a UserForm in my project. The aim is to get a small icon from the web to display in the exact centre of the browser object. The code I have got works great if I open the HTML file in Chrome or IE, but for some reason it doesn't work right in the WebBrowser object.
The problem is that the image shows in the top-left of the object, rather than in the middle. This is the code at the moment, I welcome you to test it with an external web browser (IE, Chrome) and with an Excel WebBrowser to see the difference for yourself.
<!DOCTYPE html>
<body scroll='no'>
<div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%">
<img src="http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=nph&size=medium&rarity=M" style="position: absolute; margin: auto; top: 0px; left: 0px; right: 0px; bottom: 0px"/>
</div>
</body>
Thanks for any help you can provide me as to why this won't work in Excel.
Bookmarks