For a home made border with corners around an image,
if the css should fit for each image
(without the width and height of the img in the css),
adding a {display:table} is enough [1]
the rest can be done with the same universal css
as for a bordered box with known dimensions.
All images on this page have just the same html-code and the same css, only the
image (with its width and height) is put into the html.
[1] WARNING!
This css-2 property is only working in standards compliant browsers, and is not
working in Internet Explorer.
See screenshot IE.
About the support of the display-property in IE:
-
Not working in IE6: see MSDN-page of Microsoft (April 2006).
-
No support in IE7-beta, and statement that it will not be better in IE7-definitive: see Eric Meyer's thoughts (24 March 2006).
Tested fine in Firefox1.07, Netscape6, Mozilla 1.71, Opera7.45 and Opera
8.01; all under Win98SE on pc. See screenshot FF.
Workarounds for IE: see next page
