On 23/12/2012 11:17, Markus Ernst wrote:
Am 22.12.2012 10:48 schrieb Tim Dawson:
My page at the link below shows a vertical scrollbar in Fx17,
Safari and Chrome, but not in IE9 (I've tried it on three
computers in case there were a faulty installation).

You could try to wrap the scrollbox table into a div, and apply
overflow=scroll to the wrapper div rather than the table itself. (I
have not tested it.)
Thank you for your suggestions. The odd thing is that I have done this
successfully* twice before, and never had a problem with missing scroll
bars in IE. I must have done something different, but so far haven't
spotted it.

But you have more problems than that. If the browser viewport is
smaller than your table, there is no horizontal scrollbar, thus
there is no way to see the whole page.
True, I will allow that to appear if needed. I'm sure there will be other issues, but I want to fix the scroll-bars first.

Also, if you increase font size, the header table gets larger, while
the width of the content table remains the same, but the columns at
the right side disappear (tested with Firefox 14).
Yes, in Fx17 too. It's a little odd as I didn't think I'd limited the width of the scrolling table. Will check.

Tables with fixed headers have always been a problem in HTML/CSS. I
have seen solutions using jQuery and such, but I haven't come across
a really satisfying one. Though, the last time I searched for it was
about 2 years ago, there may have been some progress since then.
Google for "fixed header table".
I was wondering whether to try jQuery too, as I can count the number of columns (which can vary), and perhaps set an explicit width accordingly although that may bring other problems. I Googled something similar, and got some stuff that was about five years old. May still be valid, but of course pre-dates HTML5 and CSS3. One suggestion used three tables (an outer one containing both the fixed header table and the scrolling one).

<aside> I actually don't understand how such a common task as a
scrolling table with a fixed header can remain unsupported for
decades of HTML/CSS development. Anyway I did not follow possible
discussions on this topic. </aside>
Yes, it is strange.

* But in both cases have great difficulty keeping the columns of header
table and scrolling table accurately aligned (specially when opening
<inputs /> in some of the cells). Both examples require login before they can be seen, so I can't easily give you a link.

Tim

--
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP

01681 700718
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to