Centreing a DIV without setting its width
Is it possible to centre a DIV horizontally on the page, without actually setting a width for that DIV. The DIVs content is generated at runtime, so the width is unknown.
Date Created: 29th September 2006
Date Modified: 29th September 2006
> Centreing a DIV with no width set
Trying to answer WebmasterWorld CSS Forum:
Also see http://www.webmasterworld.com/forum83/5929.htm
A 2px border (blue in this case) is required around the image and the caption. Hhhmmm, can't seem to quite do it!
Works OK in IE6 and Opera, FF displays caption next to image, even after <br>... using
<span> tags and
display:-moz-inline-box; for FF)