37 users online (1 members and 36 guests)  


  Results 1 to 7 of 7

Related

  1. iframe scrollbars    Forum: CSS Forum
    Replies: 4
  2. Help! scrollbars for tables    Forum: HTML Forum
    Replies: 0
  3. Replies: 2
  4. Vertical Scrollbars    Forum: HTML Forum
    Replies: 1
  5. Replies: 2
  1. #1
    nitin's Avatar
    Disabled

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    5

    Tables and scrollbars

    Hi,
    I am having a dynamic table whose rows and columns increases using javascript
    I have added a scrollbar to this table using <div>tag
    I want the vertical scrollbar to start from the second row
    but the horizontal scrollbar should take the first row into account
    Can u help me

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya, welcome to the forums.

    Coould you explain 'but the horizontal scrollbar should take the first row into account'? I am not sure what this means exactly.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    nitin's Avatar
    Disabled

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    5
    I actually want the vertical scrollbar to start from the second row and the horizontal scrollbar to start from the second column.
    My structure is as follows
    <div>//This contains code for scrollbar
    <Table>
    The first row is heading and the first column is sr nos
    The number of rows and columns can increase dynamically
    also the headers and sr nos increases as this happens
    </table>
    </div>

  4. #4
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440
    So you want the header of the columns to scroll along horizontally with the columns while the header of the rows scrolls along with the rows vertically?
    Good question.
    Are you on an intranet where you could reliably embed an Excel document confident that everybody using it has Excel? Or is it a WWW document that could be seen by anybody, therefore has to be done 'open source'?

  5. #5
    nitin's Avatar
    Disabled

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    5
    yes this is exactly what I want.
    My document is in www format
    Can u find a soln

  6. #6
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107
    Something like this?
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>
    <body>
    <table cellspacing="0" cellpadding="2" id="header">
    <col width="100"><col width="150"><col width="268">
    <tr>
    <td width="100" bgcolor="lightgrey">Category</td>
    <td width="150" bgcolor="lightgrey">Name</td>
    <td width="218" bgcolor="lightgrey">Description</td>
    </tr>
    </table>
    <div style="overflow: auto; width: 480px; height: 100px; border-left: 1px gray solid; border-bottom: 1px gray solid; padding:0px; margin: 0px;">
    <table cellspacing="0" cellpadding="2">
    <col width="100"><col width="150"><col width="200">
    <tr>
    <td width="100" valign="top" nowrap>Category 1</td>
    <td width="150" valign="top">Name 1</td>
    <td width="200" valign="top">Description 1</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 2</td>
    <td width="150" valign="top">Name 2</td>
    <td width="200" valign="top">Description 2</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 3</td>
    <td width="150" valign="top">Name 3</td>
    <td width="200" valign="top">Description 3</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 4</td>
    <td width="150" valign="top">Name 4</td>
    <td width="200" valign="top">Description 4</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 5</td>
    <td width="150" valign="top">Name 5</td>
    <td width="200" valign="top">Description 5</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 6</td>
    <td width="150" valign="top">Name 6</td>
    <td width="200" valign="top">Description 6</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 7</td>
    <td width="150" valign="top">Name 7</td>
    <td width="200" valign="top">Description 7</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 8</td>
    <td width="150" valign="top">Name 8</td>
    <td width="200" valign="top">Description 8</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 9</td>
    <td width="150" valign="top">Name 9</td>
    <td width="200" valign="top">Description 9</td>
    </tr>
    <tr>
    <td width="100" valign="top" nowrap>Category 10</td>
    <td width="150" valign="top">Name 10</td>
    <td width="200" valign="top">Description 10</td>
    </tr>
    </table>
    </div>
    </body>
    </html>

  7. #7
    nitin's Avatar
    Disabled

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    5

    Lightbulb Also a horizontal scrollbar

    Hi Coreybryant ,
    Thanks for the reply.
    But I want one horizontal and one vertical scrollbar for the table.
    The first row is heading and is fixed as U have done.
    Also the first column is fixed and contains serial numbers.

    Can U help
    Bye



Tags for this Thread