Is there a reason why aligning an arbitrary image horizontally is so challenging (or as one response mentioned, "It is not possible.")? I previously had centered images that were functioning correctly for years; however, suddenly they stubbornly position themselves to the left. Could this be attributed to recent CSS modifications?
I have tweaked the code below, which was adapted from the DIY CSS, in hopes of achieving my desired outcome, but it appears to be ineffective.
<!DOCTYPE html>
<html><head>
<style>
img { display:block; }
</style>
</head>
<body>
<h2>Thumbnail Images</h2>
<p> ... </p>
<div style="margin: 0 auto;">
<img src="paris.jpg" alt="Paris"
width=15% >
</div>
</body></html>
While I understand that scaling an image by percentage width is inexplicably disallowed, Jukka suggested that I proceed with using it anyway since it functions flawlessly across all browsers tested and serves its intended purpose of maintaining image size proportionate to page width. When floating the image to the right or left, it seems to work fine, allowing me to add a caption beside the image. However, the straightforward 'margin : 0 auto;' fails without any apparent justification that I can identify.