Results 1 to 3 of 3

Thread: Set height of the row when column is hiden

  1. #1
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Set height of the row when column is hiden

    Hi, need help please!

    Hiding column but can't set the height of row

    I'm hiding the columns within the row, but can't seem to hide the row nor set the height of the row!

    <tr style="visibility: hidden; height: 0px;">
    <td colspan="4" style="visibility: hidden; height: 0px;">
    "object"
    </td>
    </tr>

    How can I set the height of the row when column is hiden.

    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    well by "hide the height of the row" i'm assuming you mean the space in which it would take up if it were visible...

    In which case, the visibility property only makes an element transparent. Thus keeping the same real estate it would take up if it were visible.

    If you want to completely remove the element AND the space it would take up, you need to use the display property.

    Code:
    td {
    display:none;
    }
    now keep in mind, that code snippet will remove ALL <td> on your page... so if you have access to the html, you should add a class to that particular <td> so as to separate it from all the others.

    like this...

    Code:
    <tr style="visibility: hidden; height: 0px;"> 
    <td colspan="4" class="hideme">
    "object"
    </td>
    </tr>
    Then use this css...

    Code:
    <style type="text/css">
    td.hideme{
    display:none;
    }
    </style>
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Smile Thank you very much

    Thanks a million it works great...

    <tr style="display:none;">

    Regards

Bookmarks

Posting Permissions

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