The above HTML code is sometimes ignored by FireFox, but worse: It's not even allowed in XHTML1.0 Strict.
I have updated my sites to be "Strict" compatible, except for this little thing which is important enough. The problem is that I have found nothing to replace it.
In this example:
<a href="http://greatday.com/motivate/index.html"> <img style="width:18em;" src="http://greatday.com/motivate/dmsum.gif" alt="Daily Motivator" title="Daily Motivator" /></a>
the image should be centered, but even if I enclose it by a div with text-align:center,
FireFox places the image to the far left. This happens with many other objects as well, especially if they are defined as block elements.
Surely it shouldn't be like this?
Or rather, how can we continue having centered objects while confirming to the newer standards?
I could write a table-like construct using divs and css, but that would be extremely clumsy for a little thing like this. I'm looking for a simple solution, where HTML defines the content and css the style! :)