vertical-align="middle" for td is not working if we use <!doctype ...>
Posted
by Manohar
on Stack Overflow
See other posts from Stack Overflow
or by Manohar
Published on 2010-04-13T06:07:01Z
Indexed on
2010/04/13
6:13 UTC
Read the original article
Hit count: 318
Hi,
I am trying to middle align an element, But I have bumped into this problem. I am using this tag:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<table style="width:100%; height: 100%" cellspacing="0" cellpadding="0">
<tr>
<td vertical-align="middle">
<div id="progressContainer" style="text-align:center;">
Some string here
</div>
</td>
</tr>
</table>
</body>
</html>
If I remove this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
, its middle aligned properly.
Question:
Am I doing anything wrong here?
© Stack Overflow or respective owner