table with a scrollbar?

Discussion in 'ASP .Net' started by PJ6, Aug 17, 2005.

  1. PJ6

    PJ6 Guest

    I have a user control (HTML table) within a table. Would it be possible to
    cause the user control to scroll its conents when its container is too
    small, or will I just have to make its height = 100% so it can't cause its
    container to resize too big?

    Paul
     
    PJ6, Aug 17, 2005
    #1
    1. Advertising

  2. You can put your table (or any control) into a fixed size area by putting it
    in a scrollable div such as this:

    <div id="Layer1" style="position:relative;width:350px;height:200px;overflow:
    scroll;">control goes here</div>

    The key is to use the "overflow" CSS attribute.Here's more info:
    http://www.w3schools.com/css/pr_pos_overflow.asp

    Another option is to put your control in an IFrame.
    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/IFRAME.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "PJ6" <> wrote in message
    news:%...
    >I have a user control (HTML table) within a table. Would it be possible to
    >cause the user control to scroll its conents when its container is too
    >small, or will I just have to make its height = 100% so it can't cause its
    >container to resize too big?
    >
    > Paul
    >
     
    Steve C. Orr [MVP, MCSD], Aug 17, 2005
    #2
    1. Advertising

  3. PJ6

    PJ6 Guest

    Thanks, that's exactly what I was looking for.

    Paul

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > You can put your table (or any control) into a fixed size area by putting
    > it in a scrollable div such as this:
    >
    > <div id="Layer1"
    > style="position:relative;width:350px;height:200px;overflow:
    > scroll;">control goes here</div>
    >
    > The key is to use the "overflow" CSS attribute.Here's more info:
    > http://www.w3schools.com/css/pr_pos_overflow.asp
    >
    > Another option is to put your control in an IFrame.
    > http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/IFRAME.asp
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > "PJ6" <> wrote in message
    > news:%...
    >>I have a user control (HTML table) within a table. Would it be possible to
    >>cause the user control to scroll its conents when its container is too
    >>small, or will I just have to make its height = 100% so it can't cause its
    >>container to resize too big?
    >>
    >> Paul
    >>

    >
    >
     
    PJ6, Aug 17, 2005
    #3
  4. You may also find this useful. Freeze columns and rows
    like Excel but in your html table:

    http://www.eggheadcafe.com/articles/pfc/aspnet_scrollable_table_server_control.asp

    --
    Robbe Morris - 2004/2005 Microsoft MVP C#

    Earn money answering .NET Framework
    messageboard posts at EggHeadCafe.com.
    http://www.eggheadcafe.com/forums/merit.asp



    "PJ6" <> wrote in message
    news:%...
    >I have a user control (HTML table) within a table. Would it be possible to
    >cause the user control to scroll its conents when its container is too
    >small, or will I just have to make its height = 100% so it can't cause its
    >container to resize too big?
    >
    > Paul
    >
     
    Robbe Morris [C# MVP], Aug 18, 2005
    #4
    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. John M

    Scrollbar in table

    John M, Jun 12, 2004, in forum: HTML
    Replies:
    16
    Views:
    62,930
    SpaceGirl
    Jun 18, 2004
  2. Manuel Hegemann

    Scrollbar within a table

    Manuel Hegemann, Jul 22, 2004, in forum: HTML
    Replies:
    4
    Views:
    6,281
    Manuel Hegemann
    Jul 22, 2004
  3. phl
    Replies:
    14
    Views:
    3,464
    Neredbojias
    Aug 11, 2007
  4. Brock

    table with scrollbar?

    Brock, Jul 11, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    756
    Brock
    Jul 11, 2008
  5. Alex

    ScrollBar? Does it exist just WEB ScrollBar Control?

    Alex, Apr 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    272
    Alvin Bruney [MVP]
    Apr 4, 2004
Loading...

Share This Page