Greetings: My organization needs an HTML table with fixed headers and a scrollable table body. We are using Javascript to append rows to a tbody element using Prototype''s DOM builder in response to an Ajax request (works perfectly). I would like to implement fixed headers in Prototype-based Javascript, not a pure CSS solution. We have experimented with pure CSS based solutions widely available on the net with mixed and unpredictable results across browsers. Please guide us. Thanks, J --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
What you are asking for will require some custom coding, using a combination of a CSS-based approach (use a thead, and a tbody with a fixed height and overflow set to scroll) which will work for the good browsers out there. Unfortunately IE (both IE6 and IE7) does not support such a technique. You have a few options for IE, this one could work somewhat good... Position the thead absolutely, put a div wrapper around the table and give this wrapper the same properties as described above (fixed height, overflow set to scroll). You will also have to undo the fixed height on the tbody, because IE balks pretty bad at this. I suggest making use of conditional comments to feed IE special CSS files. Getting the absolutely positioned thead to align perfectly with the table contents can prove tricky, you may wish to utilize CSS to position it properly, but for the most part this would be a 100% CSS solution. -justin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, May 20, 2008 at 3:23 PM, Justin Perkins <justinperkins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ... you may wish to utilize CSS to ...That should have read "you may wish to utilize JavaScript". Sorry about that. -justin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---