www.webdeveloper.com
Results 1 to 8 of 8

Thread: How do I sync scrolling in a spreadsheet

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    5

    How do I sync scrolling in a spreadsheet

    I plan to construct a spreadsheet giving attribute vs. element hits. I would like to be able to separate the column labels (the elements) from the row labels (the attributes) and scroll on the remaining 'hit' table. Can't figure out how to do this (I'm new to HTML/CSS/Javascript).

    The goal is to provide a link to all attributes and elements, giving explanations, syntax, and examples, and to link to appropriate text associated with the intersection of an attribute and element. As a simple table, when I scroll the row/column headers scroll also. The result is that they scroll out of range and are not visible. I'd like to make the row and column names permanently visible and to link scrolling with the row and column.

    thanks

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    Do you have any existing code to look at to make suggestions or are you just looking for a starting point?

  3. #3
    Join Date
    Apr 2012
    Posts
    5
    I smart and lazy. If you've got a starting point - I'll use the 'smart' part of my personality. If you give me an answer, I'll use the lazy part of my personality. Either way, I win.

    Using HTML 4.01 as a base for attribute and element names and definitions I constructed a complete table in Excel and then saved it as an HTML file. Neglecting all of the Microsoft (VML?) attributes, I have a table. The constructed code does not have table headers (<th> tags) only table data (<td> tags). When I scroll, everything scrolls (as expected). I did rotate column labels 90degress (vertical) but when I changed the <td>'s to <th>'s the text font and sizes changed (I'm working on this) but scrolling stayed the same.

  4. #4
    Join Date
    Jan 2009
    Posts
    3,346
    You can break the "headers" into a table of their own...then put the data cells in a div and set the overflow:auto with a fixed height (could be percentage, just can't be auto) and then stack the 2 parts on top of each other.

  5. #5
    Join Date
    Apr 2012
    Posts
    5
    I will certainly try this but does this solve the issue of syncing scrolling of column / row headers with data scrolling? I would to not have scroll bars appear in the headers but allow the header scrolling to to be synced with data scrolling (scrolling the data right/left scrolls the column headers right/left, scrolling the data up/down scrolls the row headers up/down)?

  6. #6
    Join Date
    Jan 2009
    Posts
    3,346
    Sorry, didn't catch that you wanted to also keep them connected for horizontal scrolling. You'll probably end up with a javascript to connect them together then.

  7. #7
    Join Date
    Apr 2012
    Posts
    1

    educational toys

    It is very essential to kids to develop their learning skills

  8. #8
    Join Date
    Apr 2012
    Posts
    5
    Quote Originally Posted by criterion9 View Post
    Sorry, didn't catch that you wanted to also keep them connected for horizontal scrolling. You'll probably end up with a javascript to connect them together then.
    Sigh; I've just started reading the Javascript standard (Ecma-262) and soon I'll be an expert (really?). Actually that's what I'd thought but being new at HTML I'd also thought that it's best to ask the best.

    Thanks
    art

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles