SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    style="visibility: collapse"

    Hi,

    collapse does not work in IE6 on <tr> and <td>. also, in mozilla 1.5 it hides the element but does not collapse it. the only thing i can get to work is
    <col width=300 style="visibility: collapse">
    in mozilla, but this does not work in IE6.

    anyone aware of this problem or know of a workaround?

  2. #2
    SitePoint Zealot tss68nl's Avatar
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean by collapse....you want to make the element not only not visible, but also not taking up space?

    Set style="display : none" to make sure it does not take up space either. Visible is only intended to make it invisible, not remove it from the processing list.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    from what i read, collapse is supposed to not only hide the element, but make it take up no space when used with <tr> and <td>. hidden is supposed to simply hide it without getting rid of the space.

    if i use display: none; what do i use to get it back to showing?

    thx

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    HTML Code:
    <col width=300 style="display: none;" id="myCol">
    Use this Javascript with the column to toggle display. Note my changes to your HTML code.
    Code:
    function toggleCol() {
      var MC = document.getElementById("myCol");
      if ('none' == MC.style.display) {
      //set back to normal
      MC.style.display = '';
      } else {
      //hide the column again
       MC.style.display = 'none';
      }
    }

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good idea...thanks

    i'd still like to know why collapse doesn't work as it should though

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by nails11
    i'd still like to know why collapse doesn't work as it should though
    Because IE/Windows's support for CSS is not up to snuff.

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got it thx

  8. #8
    SitePoint Zealot tss68nl's Avatar
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must admit I did not read the official CSS specs, but for what I've been learning visibility is intended to be a means of making something invisible without using a bulky opacity filter (which are only available in IE even), and display is used to set wether something is actually in the processing list of the page, hence takes up space?

    It has been working like that since IE 4 and Netscape 6 I think.


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
  •