javascript to grow divs in table

Discussion in 'Javascript' started by soni2926@yahoo.com, Apr 7, 2007.

  1. Guest

    hi,
    I have a table with <tr> rows which contains <div>, those divs
    contains another table, that table contains product information.
    Basically it looks like this:

    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    This repeats depending on how many products are returned, is there
    anyway to hide and display it without the space being there when it's
    hidden? overall something like this:
    <!-- 1st Order -->
    <table>
    <tr>
    <td>abc</td>
    <td>kdfk</td>
    </table>
    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    <!-- 2nd Order -->
    <table>
    <tr>
    <td>abc</td>
    <td>kdfk</td>
    </table>

    I have it so that the div areas hide and show when a link is clicked,
    but when hidden there is a large gap inbetween the tables, anyway to
    make it so that when it's hidden the gap is reduced and when show it's
    grows to make room for it?

    Thanks.
     
    , Apr 7, 2007
    #1
    1. Advertisements

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. Lee

    Can Divs automatically grow?

    Lee, Dec 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,491
  2. rich
    Replies:
    0
    Views:
    924
  3. Paul B

    Making a table with divs

    Paul B, Apr 13, 2006, in forum: HTML
    Replies:
    76
    Views:
    8,418
    Neredbojias
    Apr 23, 2006
  4. Replies:
    2
    Views:
    480
  5. David
    Replies:
    3
    Views:
    796
    David
    Jul 17, 2009
  6. Notsoswuyd

    Divs & Table Problem

    Notsoswuyd, Aug 26, 2009, in forum: HTML and CSS
    Replies:
    0
    Views:
    606
    Notsoswuyd
    Aug 26, 2009
  7. Scott
    Replies:
    5
    Views:
    1,709
    Jan C. Faerber
    Oct 29, 2009
  8. maya
    Replies:
    4
    Views:
    499
Loading...