positioning a layout table and making it invisible

S

Sunfire

I need to know how to position a layout table in code next to (to the right
of) another table on the page? I also then need to know how to make it
invisible in code. How would you do this?
 
N

Nathan Sokalski

There are two ways to do this:

1. Use a table with one row containing two cells. Place each of the tables
in one of these cells.

2. Add the style property display:inline-table; to the table tag. This
should work, but you may want to test it in each browser you expect your
users to view your site in, since some browsers do not yet support
inline-table as a value for the display property.

To make the table invisible, you can add the style property display:none; to
the table tag. This will still generate the HTML for the table, but the
browser will render the HTML as if it did not exist. If you do not want the
HTML for the table to be rendered at all, change the table tag to the
following:

<table id="tblHidden" runat="server" visible="false">

Adding the visible="false" property to any server-side control will prevent
the control's code (and it's children's code) from generating any HTML.
Including the runat="server" property as I did above causes the table tag to
be viewed by ASP.NET as the HtmlTable class. You can also use the Table
control, but I see no advantage to that unless you plan to do a lot of
dynamic creating and editing of the Table. Hopefully all this will help you
figure out what you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top