|
Posted by Toby A Inkster on 07/20/07 18:10
Sean wrote:
> I've got a table that is wider than the window, and I was wondering if
> there is any way to setup some persistent columns and have the others
> slide "behind" them...similar to what you can do in Excel. Any
> thoughts?
If you were to ask about rows, then yes, this is possible -- you can use
CSS to set an explicit height on TBODY and then scroll the overflow,
allowing the THEAD and TFOOT to remain stationary. However, it has limited
browser support IIRC.
The best suggestion I can give you is to repeat the important columns at
the end.
e.g.:
=====================================================================================================
Nation |Currency|Language|Pop [1]|CO2 [2]|CO2/pop [3]|GDP [4] |GDP/pop [5]|GDP/CO2 [6]|Nation
---------+--------+--------+-------+-------+-----------+-----------+-----------+-----------+---------
France |EUR |fr | 64| 378| 6.2| 2 216 273| 35 404| 5 859|France
UK |GBP |en | 60| 544| 9.4| 2 295 039| 39 214| 4 222|UK
USA |USD |en-US | 302| 5872| 19.8| 12 438 873| 44 190| 2 118|USA
Australia|AUD |en-AU | 21| 356| 18.8| 692 436| 36 553| 1 943|Australia
=====================================================================================================
1. Millions.
2. Carbon Dioxide Emissions (Megatonnes) per annum.
3. Carbon Dioxide Emissions (Tonnes) per capita, per annum.
4. Millions of US Dollars per annum.
5. US Dollars per capita, per annum.
6. US Dollars per tonne of CO2.
By putting the Nation column at each end of the table, I've made it
easier to read no matter which end you've scrolled to.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 29 days, 18:31.]
Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/07/20/html-table-parsing/
[Back to original message]
|