Table stucture changing when panel is displayed

P

Pavan

Hi All,
I am having a wierd problem while displaying my panel. My code is
something like this

<table>
<tr>
<td width=100>label</td>
<td width=100>label</td>
<td width=100>label</td>
<td width=100>button in this cell</td>
</tr>
<tr>
<td colspan=4 width=400>
<panel>literal inside the panel</panel>
</td>
</tr>
</table>

this is actually the structure of my repeater control, and I am
toggling the visibility of my panel on the client side, whenever the
button in the first row is clicked.
The approach works fine when the text in the literal is shorter than
the table width, which is 400. But, when it is longer and it had to be
wrapped, the entire table structure is messed up, the colums widths are
changing at each toggle of the panel display.
However, if I insert line breaks(<br>)in literal string, so that the
string between two line breaks is less than the page width, its working
perfect.
any idea why the table structure is messed up when the string is larger
than page width.

Any help is greatly appreciated.

Thanks
 
S

S. Justin Gengo

Pavan,

I think those results will vary from browser to browser depending on how
they render.

Have you tried using percentages for the widths instead of fixed values? (I
would try that - at least for the last column with the panel in it.)

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
B

Bruce Barker

tables alway resize to hold their content, unless the content has overflow
rules that prevents the content from getting larger.

try (large content is scrolled):

<table>
<tr>
<td width=100>label</td>
<td width=100>label</td>
<td width=100>label</td>
<td width=100>button in this cell</td>
</tr>
<tr>
<td colspan=4>
<div style="width:100%;overflow:auto;">literal inside the div</div>
</td>
</tr>
</table>


note: panel is not a valid html object


-- bruce (sqlwork.com)
 
P

Pavan

Justin, Bruce,
I tried each of your approaches but unfortunately, neither of them
worked.
however, the problem is solved by packaging the literal inside the
panel with a table.

<tr>
<td colspan=4 width=400>
<panel>
<table>
<tr>
<td>literal inside the panel</td>
</tr>
</table>
</panel>
</td>
</tr>

I would appreciate if anyone could explain this behavior.

Thanks.
 

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,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top