div element taking up space

Discussion in 'ASP .Net Building Controls' started by dave, Nov 25, 2003.

  1. dave

    dave Guest

    I am hiding the contents of a table cell with
    display:none like the following:

    When I do this and while hidden the row still takes up
    some vertical space. How can I best use div elements to
    hide table row while not taking up and vertical space?

    thx


    <TR>
    <TD><DIV id="div1"
    style="display:none;">Something</DIV></TD>
    <TD>
    <DIV id="div2" style="display:none;">
    <input
    name="dgCompany:_ctl2:txtProjectNumber" type="text"
    id="dgCompany__ctl2_txtProjectNumber" class="clsInput" />
    </DIV>
    </TD>
    </TR>
    dave, Nov 25, 2003
    #1
    1. Advertising

  2. cant you just set the display mode of the cell as none whereas to adding an
    extra element into the the table cell and making that invisible.
    "dave" <> wrote in message
    news:01dd01c3b37b$7c5b8db0$...
    > I am hiding the contents of a table cell with
    > display:none like the following:
    >
    > When I do this and while hidden the row still takes up
    > some vertical space. How can I best use div elements to
    > hide table row while not taking up and vertical space?
    >
    > thx
    >
    >
    > <TR>
    > <TD><DIV id="div1"
    > style="display:none;">Something</DIV></TD>
    > <TD>
    > <DIV id="div2" style="display:none;">
    > <input
    > name="dgCompany:_ctl2:txtProjectNumber" type="text"
    > id="dgCompany__ctl2_txtProjectNumber" class="clsInput" />
    > </DIV>
    > </TD>
    > </TR>
    Alessandro Zifiglio, Nov 25, 2003
    #2
    1. Advertising

  3. dave

    MSFT Guest

    Hi dave,

    I think you may set the table run at server side. In this way, you can hide
    a row with following code:

    table1.Rows[1].Visible =false;

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    MSFT, Nov 26, 2003
    #3
    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. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,869
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,629
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    984
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    708
    Michael Hudson
    Oct 24, 2003
  5. CRPietschmann
    Replies:
    1
    Views:
    219
    marss
    Apr 28, 2006
Loading...

Share This Page