views:

53

answers:

1

Hi

Why does XHTML 1.0 Strict display a line height as appearing larger than a line height of the same value in XHTML 1.0 Transitional?

This therefore pushing down content within table cells (i.e Hotmail in Firefox, Gmail in IE and Firefox). Has anyone else experienced this issue and know a way around it?

Cheers

Heres an example code for each XHTML type:

Transitional:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="500" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:18px;"><font style="line-height:18px; font-size:16px; font-family:Arial, Helvetica, sans-serif;">This cell will be larger in Strict</font></td>
  </tr>
</table>

</body>
</html>

Strict:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="500" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:18px;"><font style="line-height:18px; font-size:16px; font-family:Arial, Helvetica, sans-serif;">This cell will be larger in Strict</font></td>
  </tr>
</table>
</body>
</html>
+4  A: 

@ryano as far as I am aware, there is not a definitive fix for this, most people seem to be using a margin-top:-2px; fix on the table-cell itself.

Hope that helps.

Neurofluxation