Re: How to set ScrollBars in a Table Cell

Discussion in 'ASP .Net' started by RSH, Jan 3, 2007.

  1. RSH

    RSH Guest

    This is a sample of how to do it:

    <table border="0">
    <tr>
    <td style="width:20px; height:50px">
    <DIV ID="ScrollingLayer" STYLE="width:100%; height:100; overflow:auto;">
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing testing testing testing
    testing testing testing testing testing testing
    </DIV>
    </td>
    </tr></table>

    HTH Ron


    "Joao Rego" <> wrote in message
    news:...
    > Hello,
    >
    > I have a WebUserControl that is basically an asp:TreeView.
    >
    > In my default window I have a table (1row,2cell) is set to height=100% and
    > width=100%.
    > I want this WebUserControl inside a Table Cell 1, but I want it to have a
    > Scroll Bar (vertical and horizontal) when the nodes in the tree grow.
    > How can I achieve this behaviour?
    >
    > I don't want to use Frames.
    > I tried to put my control in a <div>.
    > <div id="divTree" style="width:auto; height:auto; overflow:auto;"
    > runat="server">My Control</div>
    > But I don't now how to put it the sime size as my table cell. As the tree
    > grows the <div> keeps growing and I only have scrolls in my
    > InternetExplorer
    > window.
    > I have tried several attributes in the <div> but without success.
    >
    > Thanks for any help on this problem.
    > Joao Rego
    RSH, Jan 3, 2007
    #1
    1. Advertising

  2. This doesn't works in Fire Fox. Moreover when I am increasing the width the
    vertical sroll bar disappeards

    Thanks
    Rakesh Kumar


    "Joao Rego" wrote:

    > Hi Ron,
    >
    > Thanks for the tip.
    > It works OK in a simple html file, but I discovered that in a VWD 2005
    > Express the height=100% in cells don't work because of the automatic
    > generated <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    > I think I have to write a CSS for the TableCell to use height=100%.
    > I put a post about this this mornig.
    >
    > thanks,
    > Joao Rego
    >
    >
    >
    > "RSH" wrote:
    >
    > >
    > > This is a sample of how to do it:
    > >
    > > <table border="0">
    > > <tr>
    > > <td style="width:20px; height:50px">
    > > <DIV ID="ScrollingLayer" STYLE="width:100%; height:100; overflow:auto;">
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing testing testing testing
    > > testing testing testing testing testing testing
    > > </DIV>
    > > </td>
    > > </tr></table>
    > >
    > > HTH Ron
    > >
    > >
    > > "Joao Rego" <> wrote in message
    > > news:...
    > > > Hello,
    > > >
    > > > I have a WebUserControl that is basically an asp:TreeView.
    > > >
    > > > In my default window I have a table (1row,2cell) is set to height=100% and
    > > > width=100%.
    > > > I want this WebUserControl inside a Table Cell 1, but I want it to have a
    > > > Scroll Bar (vertical and horizontal) when the nodes in the tree grow.
    > > > How can I achieve this behaviour?
    > > >
    > > > I don't want to use Frames.
    > > > I tried to put my control in a <div>.
    > > > <div id="divTree" style="width:auto; height:auto; overflow:auto;"
    > > > runat="server">My Control</div>
    > > > But I don't now how to put it the sime size as my table cell. As the tree
    > > > grows the <div> keeps growing and I only have scrolls in my
    > > > InternetExplorer
    > > > window.
    > > > I have tried several attributes in the <div> but without success.
    > > >
    > > > Thanks for any help on this problem.
    > > > Joao Rego

    > >
    > >
    > >
    =?Utf-8?B?UmFrZXNoIEt1bWFy?=, Jan 6, 2007
    #2
    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. news.rcn.com
    Replies:
    1
    Views:
    9,635
    Chris Smith
    Jul 12, 2004
  2. thomas
    Replies:
    17
    Views:
    13,758
    Nico Schuyt
    Sep 18, 2003
  3. Phillip Roncoroni
    Replies:
    14
    Views:
    1,075
    Toby A Inkster
    Apr 5, 2004
  4. RJ
    Replies:
    1
    Views:
    233
    Eliyahu Goldin
    Feb 17, 2005
  5. thomas
    Replies:
    1
    Views:
    94
    Lasse Reichstein Nielsen
    Sep 18, 2003
Loading...

Share This Page