/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@criterion9Apr 10.2012 — Do you have any existing code to look at to make suggestions or are you just looking for a starting point?
Copy linkTweet thisAlerts:
@aschwarz1309authorApr 10.2012 — 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.
Copy linkTweet thisAlerts:
@criterion9Apr 10.2012 — 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.
Copy linkTweet thisAlerts:
@aschwarz1309authorApr 10.2012 — 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)?
Copy linkTweet thisAlerts:
@criterion9Apr 11.2012 — 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.
Copy linkTweet thisAlerts:
@amyjean72boylesApr 11.2012 — It is very essential to kids to develop their learning skills
Copy linkTweet thisAlerts:
@aschwarz1309authorApr 11.2012 — 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.[/QUOTE]

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
×

Success!

Help @aschwarz1309 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...