Having scrollbar inside a table

Discussion in 'HTML & Website Design' started by The Driver, Aug 3, 2006.

  1. #1
    Hey man! This is the deal. I'm working on a website and it has a table layout, but what I want is to put a scrollbar on some of the pages so I can avoid scrolling the entire window? Any help is much appreciated.

    Thanks for replying.
     
    The Driver, Aug 3, 2006 IP
  2. .bmp

    .bmp Well-Known Member

    Messages:
    130
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #2
    sounds like you want to use iframes....

    places the iframe code within the page, and the table contents as a page within it - not that thats well explained, but its the general gist

    http://www.w3schools.com/tags/tag_iframe.asp

    will explain it better
     
    .bmp, Aug 3, 2006 IP
  3. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The style attribute of "overflow: scroll" may accomplish what you are looking for.
     
    Gordaen, Aug 3, 2006 IP
  4. The Driver

    The Driver Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey man! Thanks for the answers. I see what you mean .bmp, using iframes sounds like a good idea but shouldn't there be an easier way to maintain this?
    And that's when we come to the style attribute as Gordaen was talking about. Now I'm not quite sure what you mean, should I just put the style attribut in the table code? I did that, but nothing happened, so please be a little bit more specific.

    Thanks for replying.
     
    The Driver, Aug 3, 2006 IP
  5. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can include it in either the table or td tag, depending on your goal. I should have mentioned you also need to set display to block and give specific dimensions.

    Example:

    .blah {
    width:150px;
    height:150px;
    overflow: scroll;
    display: block;
    }
     
    Gordaen, Aug 3, 2006 IP