Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Mobile, AL
    Posts
    138

    Collapsing row with form

    I've got some tables (I did tables to speed things up for me) and I have one row that expands/collapses and it contains a form. When the row is visible, the column it's in gets stretched horizontally a bit.

    If I leave the form/table/labels and remove just the input and textarea elements, everything is fine.

    I've done this plenty of times without problems, but this is the first with a form included.

    Here's the main table:

    Code:
    <table width="100%" cellpadding="5" cellspacing="0" border="0">
       <tr>
         <td><b>Comments for "<?=$title;?>"</b></td>
       </tr>
    <?
    $query = mysql_query("select ...");
    if(mysql_num_rows($query) > 0) { 
       while() {
    ?>
       <tr>
         <td>
         <div>
         Comment by <b><?=$name;?></b> on <?=$newtime;?>
         <br />
         <div><?=$text;?></div>
         </div>
         </td>
       </tr>
    <?
       }
    } else {
    ?>
       <tr>
         <td>There are no comments for this post.</td>
       </tr>
    <? } ?>
    
    <?
    if($comment == "yes") {
    ?>
       <tr>
         <td>
         <a href="#" onclick="return toggle_collapse('expand0')">Comment on this post</a>
         </td>
       </tr>
        <tr id="collapseobj_expand0" style="display:none">
         <td>
    
         <form action="functions.php" method="post">
            <table cellpadding="3" cellspacing="0" border="0">
               <tr>
                 <td align="left">Display Name:</td>
                 <td><input type="text" size="20" /></td>
               </tr><tr>
                 <td align="left">Comments:</td>
                 <td><textarea rows="7" cols="40"></textarea></td>
               </tr>
            </table>
         </form>
    
         </td>
       </tr>
    <? } ?>
    </table>
    Shawn Kerr

  2. #2
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,951
    What is the question?

  3. #3
    Join Date
    Jan 2004
    Location
    Mobile, AL
    Posts
    138
    How do I get it to not stretch the table out?
    Shawn Kerr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •