Table stucture changing when panel is displayed

Discussion in 'ASP .Net' started by Pavan, Sep 16, 2005.

  1. Pavan

    Pavan Guest

    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
     
    Pavan, Sep 16, 2005
    #1
    1. Advertising

  2. 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
    "Pavan" <> wrote in message
    news:...
    > 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. Justin Gengo, Sep 16, 2005
    #2
    1. Advertising

  3. Pavan

    Bruce Barker Guest

    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)

    "Pavan" <> wrote in message
    news:...
    > 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
    >
     
    Bruce Barker, Sep 16, 2005
    #3
  4. Pavan

    Pavan Guest

    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.

    Pavan wrote:
    > 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
     
    Pavan, Sep 17, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. boney
    Replies:
    1
    Views:
    604
  2. Robotnik

    Size of Stucture without sizeof()

    Robotnik, Dec 1, 2005, in forum: C Programming
    Replies:
    55
    Views:
    1,011
    Keith Thompson
    Dec 7, 2005
  3. enrique

    data stucture using c

    enrique, Aug 26, 2006, in forum: C Programming
    Replies:
    7
    Views:
    342
    Smurff
    Sep 6, 2006
  4. Dave
    Replies:
    4
    Views:
    133
    Alessandro Zifiglio
    Jul 20, 2006
  5. Joe Abou Jaoude

    passing custom classes or stucture as arguments

    Joe Abou Jaoude, Dec 10, 2005, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    211
    m.posseth
    Dec 14, 2005
Loading...

Share This Page