How do I vertically and horizontally center an image when I do not know the size of it? I asked this question and someone suggested using a table. This isn\'t the first time
If you don't mind losing the img-tag, you can use background-image to center an image in a container block.
markup:
style:
.imagebox { width: 500px; height: 500px; border: solid 1px black; background-repeat: no-repeat; background-position: 50% 50%; }