Results 1 to 12 of 12
  1. #1

    Scrollbars in tables

    Is there a way to do it? so I have only a table that scrolls down which will contain more content, and not the whole page?

  2. #2
    Join Date
    Aug 2002
    Location
    London, UK
    Posts
    9,036
    Use an iframe to achieve this.
    Matt Wallis
    United Communications Limited
    High Performance Shared & Reseller | Managed VPS Cloud | Managed Dedicated
    UK www.unitedhosting.co.uk | US www.unitedhosting.com | Since 1998.

  3. #3
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    You can do it in DHTML, but it's not worth the effort IMHO when you can do it in iframes

  4. #4
    Well I've never used frames before, so how would I do it?

    Edit: Never mind, I saw the other topic in here about it, and have done it Thanks
    Last edited by Teh Plug; 09-22-2003 at 08:38 AM.

  5. #5
    what did u use?

    i only know how to use <div>

  6. #6
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    Read this forum... loads of threads about iframes alone!

  7. #7

    use tbody

    we can create a tbody in css with this code

    tbody {
    height: 20;
    overflow: scroll;
    }


    then just put a <tbody> tag before
    <tbody>
    <tr><td>body</td></tr> ... ... ..
    </tbody>

    works only in netscape though...

  8. #8
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    2,065
    Overflow to create a scrollbar works in IE as well.
    "Stop flame-wars - Report a post"
    The original Kitty Lizard

  9. #9
    Originally posted by Reptilian Feline
    Overflow to create a scrollbar works in IE as well.
    do i have to use tbody?
    i dont know why but it seems that it doesn't work. on my IE... oh well i love using mozilla-firebird so i uges its ok.

  10. #10
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    2,065
    Put a div inside the TD and make that scrollable instead. Post some code and I'll test a couple of variations for you.
    "Stop flame-wars - Report a post"
    The original Kitty Lizard

  11. #11
    Originally posted by Reptilian Feline
    Put a div inside the TD and make that scrollable instead. Post some code and I'll test a couple of variations for you.
    oh you could do that all right...
    but its just so hard aligning the headers to the body.

    so i used tbody.
    you cant use the <DIV> outside the <TD>.
    and you cant use the <DIV> inside the table either. so get the picture... you have to create a separate <TABLE> for the header and the body its so hard to align.

  12. #12
    Join Date
    May 2003
    Location
    Lima, Perú
    Posts
    164
    HTML:

    Code:
    <table width="450" border="1" cellspacing="0" cellpadding="0">
         <tr height="80">
              <td width="90" height="80">
                   <span class="scroll">
                        This will scroll.
                   </span>
              </td> 
         </tr>
    </table>
    CSS:

    Code:
    .scroll  { width: 100%; height: 100%; overflow: auto }
    By using span, instead of div, you can make it fill just the cell you're working in.

Related Posts from theWHIR.com

Posting Permissions

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