[thelist] Vertically Centering Tables

Nebula Nebula at Planet-Nebula.com
Mon Feb 17 18:58:01 CST 2003


><><><><><><><><><><><><><><><><><><><><><><><><>
> Complete centring for Mozilla et al:
>
> html {
> 	width: 100%;
> 	height: 100%;
> }
>
> body {
> 	width: 100%;
> 	height: 100%;
> 	display: table-cell;
> 	vertical-align: middle;
> }
>
> #content {
> 	margin-left: auto;
> 	margin-right: auto;
> }
><><><><><><><><><><><><><><><><><><><><><><><><>

Perhaps I didn't do it right, but that doesn't seem to work in Mozilla
(yes, I put a <span class="content"> and </span> around my content).
This doesn't seem to work in IE, either.

Maybe I did something wrong?





More information about the thelist mailing list