<td style="padding: 0px 30px 0px 0px;"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="90%" bgcolor="green">
<tr>
<td ><div> </div></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="" height="30px"><div style="border-left:1px solid #00f;height:50px;margin-top:-21px;"> </div></td>
<td width="50%" height="30px"><div style="border-right:1px solid #00f;height:50px;margin-top:-21px;"> </div></td>
<td width="100%" height="30px"><div style="border-right:1px solid #00f;height:50px;margin-top:-21px;"> </div></td>
</tr>
</table></td>
</tr>
</table></td>
Asked
Active
Viewed 2,294 times
-5
-
5You haven't actually asked a question - Please review [**How to ask**](http://stackoverflow.com/help/how-to-ask) questions on Stack Overflow and what types of questions [**can be asked**](http://stackoverflow.com/help/on-topic) and what types [**should be avoided.**](http://stackoverflow.com/help/dont-ask) – Paulie_D Aug 10 '15 at 16:06
1 Answers
4
Even though the question is horrible, here's the answer:
You cannot reposition table cells by any CSS based method. Also, you cannot control overflow
or height
of table cells (they never overflow, they will always wrap their full content).
Neither can you position elements absolutely inside a table-cell. It's just not possible.
Using a negative margin-top
on a div
inside a td
will not have any effect unless the div
has any other preceding element neighbors. If you had for example an h1
before your div
inside the td
, you could use margin-top: -10px;
on the div to move the div
closer to the h1
visually.

connexo
- 53,704
- 14
- 91
- 128