xhtml question.

B

Bern

hi all,
suppose i have the following XHTML doc.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Welcome</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>

<body>
<table align="center" width="100%" height="100%">
<tr>
<td valign="middle" align="center">
hello
</td>
</tr>
</table>
</body>
</html>

If the "DOCTYPE" tag is *not* present, the word "hello" will be in the
middle of the page
(because of the "height" attribute in the "table" element)

But in XHTML, the "table" element does not allow "height" attribute, what
should i do in order to display the
word "hello" in the middle of the page? I need a method that is compatible
with transitional XHTML and
also compatible with previous HTML versions.
 
T

Toby Inkster

Bern said:
But in XHTML, the "table" element does not allow "height" attribute, what
should i do in order to display the
word "hello" in the middle of the page?

html,body,table { height:100%; }
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top