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.
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.
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.
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)?
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.
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.
Bookmarks