Centring shrink-to-fit boxes.

Possible multi-browser way

This is a centred shrink-to-fit div box.
This is a centred shrink-to-fit div box. But bigger in practice.
This is a centred shrink-to-fit div box. And yet bigger still in practice.
This is a centred shrink-to-fit box. And not a lot of material needs to go into it, especially not a lot of inline material like text, before the centring attribute become practically useless. Only gods have infinitely wide monitors.

back