[Proto-Scripty] Re: Scrolling Tables

2009-03-12 Thread Szymon Wilkołazki

Lee Jenkins wrote:
 
 Hi all,
 
 I'm trying to implement a scrolling table myself since my needs are very 
 simple. 
   I'm placing the table that represents the grid cells within a div with 
 overflow:auto set and it scrolls.  However, IE and FF seem to calculate the 
 width differently in regard to the scrollbars that appear.  The result is 
 that 
 the table used to represent the header of the grid becomes misaligned from 
 the 
 table that represents the cells of the grid.  I'd rather not use a 3rd party 
 table if I don't have to...
 
 Here's a sample:
 http://leebo.dreamhosters.com/misc/test.htm
 
 Any pointers?


Have you considered a scrolling header instead of the table?
You might put the _whole_ table into scrolling div.

Divide the table to thead class=mainHeader/thead and tbody/t 
body sections (or any number of tbodys).

Then, with javascript create another table, place it just before your 
table in the DOM. Copy the whole thead.mainHeader into the new table 
and copy all the widths and heingts, and styles of it.
The table should be z-indexed +1 to the original table, and absolutly 
positioned, and the containing scrolling div should be relatively 
positioned.

Then, observe the scroll event, and change the top style of your new 
table accordingly.
Also observe resize events, and recopy the gathered widths and heights 
(or recopy whole header).

This way, you have always visible table header, and no problems with 
scroll bars.

This works great for me in firefox, on intranet. Can't post the source 
though, cause my contract forbids me :(

We had many trys with your concept of scrolling tbody, but none worked 
well.

Best Regards,
SWilk

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Scrolling Tables

2009-03-11 Thread Ryan Gahl
Have you tried using thead and tbody, and placing the overflow setting on
the tbody?

Ryan Gahl
CEO
Nth Penguin, LLC
http://www.nthpenguin.com
--
Inquire: 1-920-574-2218
Blog: http://www.someElement.com
LinkedIn Profile: http://www.linkedin.com/in/ryangahl


On Wed, Mar 11, 2009 at 11:21 AM, Lee Jenkins l...@datatrakpos.com wrote:



 Hi all,

 I'm trying to implement a scrolling table myself since my needs are very
 simple.
  I'm placing the table that represents the grid cells within a div with
 overflow:auto set and it scrolls.  However, IE and FF seem to calculate the
 width differently in regard to the scrollbars that appear.  The result is
 that
 the table used to represent the header of the grid becomes misaligned from
 the
 table that represents the cells of the grid.  I'd rather not use a 3rd
 party
 table if I don't have to...

 Here's a sample:
 http://leebo.dreamhosters.com/misc/test.htm

 Any pointers?

 BTW, if this is too OT please recommend a good general site to post please.

 --
 Warm Regards,

 Lee


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Scrolling Tables

2009-03-11 Thread Lee Jenkins

Richard Quadling wrote:
 
 Looks lovely in FireFox.
 
 Really nice.
 
 In Chrome, nope. Looking at the computed style for the tbody,
 overflow-y is visible rather than scroll. I even tried inlining the
 style. The height is ignored also.
 
 In IE7, well. What a nice big cell you have there grandma. Seems like
 setting the height of tbody means IE thinks you are talking about the
 height of the cells. Oh. And no scroll bar.
 

That is what I ran into with the few samples I've googled so far.  Looks good 
in 
FF but IE looks terrible.  Haven't tried other browsers.

--
Warm Regards,

Lee

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---