I'm formatting a page using some tables. I would like to vertically center a cell in the middle of the screen.
<table width="100%" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" border="0" cellpadding="0" cellspacing="0" bgcolor="#dedede" style="-webkit-text-size-adjust:none; line-height: 66%;">
<tbody>
<tr>
<td valign="middle"> <!-- The problem is valign work only with a height element for that cell -->
<!-- This next table is the one I want to centre --><table width="600" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" align="center" style="background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pg0KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPg0KICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWQtdWNnZy1nZW5lcmF0ZWQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIxMDAlIiB4Mj0iMTYlIiB5Mj0iMCUiPg0KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNmMGY4ZmYiIHN0b3Atb3BhY2l0eT0iMSIvPg0KICAgIDxzdG9wIG9mZnNldD0iNCUiIHN0b3AtY29sb3I9IiNmYWZkZmYiIHN0b3Atb3BhY2l0eT0iMSIvPg0KICAgIDxzdG9wIG9mZnNldD0iNyUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMSIvPg0KICAgIDxzdG9wIG9mZnNldD0iMzQlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjEiLz4NCiAgICA8c3RvcCBvZmZzZXQ9IjQwJSIgc3RvcC1jb2xvcj0iI2YyZjhmZiIgc3RvcC1vcGFjaXR5PSIxIi8+DQogICAgPHN0b3Agb2Zmc2V0PSI0NCUiIHN0b3At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zz4=);background: -moz-linear-gradient(23deg, hsla(208,100%,96%,1) 0%, hsla(208,100%,98%,1) 4%, hsla(0,0%,100%,1) 7%, hsla(0,0%,100%,1) 34%, hsla(208,100%,98%,1) 40%, hsla(208,100%,96%,1) 44%, hsla(208,100%,94%,1) 50%, hsla(208,100%,91%,1) 56%, hsla(208,100%,89%,1) 60%, hsla(208,100%,86%,1) 65%, hsla(208,100%,84%,1) 69%, hsla(208,100%,82%,1) 72%, hsla(208,84%,69%,1) 87%, hsla(208,100%,60%,1) 96%, hsla(208,100%,55%,1) 98%, hsla(208,100%,50%,1) 100%);background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,hsla(208,100%,98%,1)), color-stop(4%,hsla(208,100%,98%,1)), color-stop(7%,hsla(0,0%,100%,1)), color-stop(34%,hsla(0,0%,100%,1)), color-stop(40%,hsla(208,100%,98%,1)), color-stop(44%,hsla(208,100%,96%,1)), color-stop(50%,hsla(208,100%,94%,1)), color-stop(56%,hsla(208,100%,91%,1)), color-stop(60%,hsla(208,100%,89%,1)), color-stop(65%,hsla(208,100%,86%,1)), color-stop(69%,hsla(208,100%,84%,1)), color-stop(72%,hsla(208,100%,82%,1)), color-stop(87%,hsla(208,84%,69%,1)), color-stop(96%,hsla(208,100%,60%,1)), color-stop(98%,hsla(208,100%,55%,1)), color-stop(100%,hsla(208,100%,50%,1)));background: -webkit-linear-gradient(67deg, hsla(208,100%,96%,1) 0%,hsla(208,100%,98%,1) 4%,hsla(0,0%,100%,1) 7%,hsla(0,0%,100%,1) 34%,hsla(208,100%,98%,1) 40%,hsla(208,100%,96%,1) 44%,hsla(208,100%,94%,1) 50%,hsla(208,100%,91%,1) 56%,hsla(208,100%,89%,1) 60%,hsla(208,100%,86%,1) 65%,hsla(208,100%,84%,1) 69%,hsla(208,100%,82%,1) 72%,hsla(208,84%,69%,1) 87%,hsla(208,100%,60%,1) 96%,hsla(208,100%,55%,1) 98%,hsla(208,100%,50%,1) 100%);background: -o-linear-gradient(67deg, hsla(208,100%,96%,1) 0%,hsla(208,100%,98%,1) 4%,hsla(0,0%,100%,1) 7%,hsla(0,0%,100%,1) 34%,hsla(208,100%,98%,1) 40%,hsla(208,100%,96%,1) 44%,hsla(208,100%,94%,1) 50%,hsla(208,100%,91%,1) 56%,hsla(208,100%,89%,1) 60%,hsla(208,100%,86%,1) 65%,hsla(208,100%,84%,1) 69%,hsla(208,100%,82%,1) 72%,hsla(208,84%,69%,1) 87%,hsla(208,100%,60%,1) 96%,hsla(208,100%,55%,1) 98%,hsla(208,100%,50%,1) 100%);background: -ms-linear-gradient(23deg, hsla(208,100%,96%,1) 0%,hsla(208,100%,98%,1) 4%,hsla(0,0%,100%,1) 7%,hsla(0,0%,100%,1) 34%,hsla(208,100%,98%,1) 40%,hsla(208,100%,96%,1) 44%,hsla(208,100%,94%,1) 50%,hsla(208,100%,91%,1) 56%,hsla(208,100%,89%,1) 60%,hsla(208,100%,86%,1) 65%,hsla(208,100%,84%,1) 69%,hsla(208,100%,82%,1) 72%,hsla(208,84%,69%,1) 87%,hsla(208,100%,60%,1) 96%,hsla(208,100%,55%,1) 98%,hsla(208,100%,50%,1) 100%);background: linear-gradient(23deg, hsla(208,100%,96%,1) 0%,hsla(208,100%,98%,1) 4%,hsla(0,0%,100%,1) 7%,hsla(0,0%,100%,1) 34%,hsla(208,100%,98%,1) 40%,hsla(208,100%,96%,1) 44%,hsla(208,100%,94%,1) 50%,hsla(208,100%,91%,1) 56%,hsla(208,100%,89%,1) 60%,hsla(208,100%,86%,1) 65%,hsla(208,100%,84%,1) 69%,hsla(208,100%,82%,1) 72%,hsla(208,84%,69%,1) 87%,hsla(208,100%,60%,1) 96%,hsla(208,100%,55%,1) 98%,hsla(208,100%,50%,1) 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7fbff', endColorstr='#0083ff',GradientType=1 );-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px;-webkit-box-shadow: #222 -25px 25px 70px;-moz-box-shadow: #222 -25px 25px 70px;box-shadow: #222 -25px 25px 70px;">
<thead>
<tr>
<td height="140px"></td>
</tr>
</thead>
<tbody>
<tr>
<td width="35">
</td>
<td width="530">
<font color="#5e5e5e" face="Arial, Helvetica, sans-serif" size="2" style="font-size: 12px;">
<strong>Madame Monsieur,</strong>
<br>
<br>
<br>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
<br>
</font>
</td>
<td width="35"></td>
</tr>
</tr>
<tr>
<td width="35"></td>
<td height="33" width="530">
<!--img src="http://lapostegp-t.neolane.net/res/img/0ACC00B0C045ED53D213B37D5CBB02E4.jpg" alt="" border="0" width="530" height="33" style="display: block;"-->
</td>
<td width="35"></td>
</tr>
</tr>
</tbody>
</table>
</td>
</td>
</tbody>
</table>
It work if I use JavaScript
However JavaScript elements are filtered in email clients, and the support for viewports units is far too low.
current behaviour:
Wanted behaviour:
So is there a CSS way to fix this (I don't care if it require a browser)?