Posted by dorayme on 08/19/06 22:51
In article <ec839c$2cl$1@newsreader2.netcologne.de>,
Martin Pöpping <martin_p@despammed.com> wrote:
> I want the DIV Tag vertically centered, but it does not work.
Divs are 100% wide in relation to their containers (eg. body) by
default. So if you want one centred, you need to give it a width
smaller than the container in which you want it to appear but big
enough to hold the content that is inside it (this needs careful
though often). Then you need to instruct it to centre. This
usually works:
margin-left: auto;
margin-right: auto
--
dorayme
[Back to original message]
|