I’m using ASP.NET 3.0+, and have a table as follows:
<asp:Table ID="metadataTable" runat="server" BorderWidth="0" CellSpacing="5">
<asp:TableRow>
<asp:TableCell BorderWidth="3" ID="tcProperties1" ><asp:PlaceHolder ID="Properties1" runat="server"></asp:PlaceHolder></asp:TableCell>
<asp:TableCell BorderWidth="3" ID="tcProperties2" ><asp:PlaceHolder ID="Properties2" runat="server"></asp:PlaceHolder></asp:TableCell>
<asp:TableCell BorderWidth="3" ID="tcProperties3" ><asp:PlaceHolder ID="Properties3" runat="server"></asp:PlaceHolder></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell BorderWidth="3" ID="tcTree1" VerticalAlign="Top"><asp:PlaceHolder ID="Tree1" runat="server"></asp:PlaceHolder></asp:TableCell>
<asp:TableCell BorderWidth="3" ID="tcTree2" VerticalAlign="Top"><asp:PlaceHolder ID="Tree2" runat="server"></asp:PlaceHolder></asp:TableCell>
<asp:TableCell BorderWidth="3" ID="tcTree3" VerticalAlign="Top"><asp:PlaceHolder ID="Tree3" runat="server"></asp:PlaceHolder></asp:TableCell>
</asp:TableRow>
</asp:Table>
The problem is that the placeholders are sometimes intentionally empty. For this I call:
tcProperties2.Visible = false;
tcTree1.Visible = false;
tcTree3.Visible = false;
and the cells are shifting left. i.e. when I want:
[Cell 0,0] [Cell 2,0]
[Cell 1,1]
where cell 0,1 1,0 and 2,1 have no Controls, and I get the following instead:
[Cell 0,0] [Cell 2,0]
[Cell 1,1]
Is there any way to keep them spaced out without using the obvious   hack?
Add the following CSS to your code, either by including it at an external/embedded CSS stylesheet, or by adding an inline style: