In HTML 4.01 Transitional you can center some text (horizontally and vertically) in the middle of the page. However i'm having troubles getting it to work with XHTML, if it's possible.
If I change the !DOCTYPE to HTML 4.01 Transitional, then the text becomes centered. But when I change the !DOCTYPE back to XHTML 1.1 then the text stays at the top of the page.
Suggestions?
Code:
...
<style type="text/css">
#moo { width: 100%; height: 100%; }
</style>
</head>
<body>
<table id="moo">
<tr>
<td align="center">
Hello, this should be in the middle of the page.
</td>
</tr>
</table>
...
If I change the !DOCTYPE to HTML 4.01 Transitional, then the text becomes centered. But when I change the !DOCTYPE back to XHTML 1.1 then the text stays at the top of the page.
Suggestions?
Last edited: