SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    New Zealand
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table - fixed header, scrolling rows

    Here's what I'd like to do and I'm wondering if any of you CSS experts can provide a solution (or tell me it's impossible).

    Imagine a fixed height div with a table inside it. As the number of rows in the table increases, there comes a point when the div will add a scrollbar and you can scroll the table rows up and down within the div.

    Simple enough, but when it scrolls, the header row disappears.

    My challenge is to have the column headers visible at all times, so the rows scroll beneath the header row (Just like spreadsheet rows do when you freeze the header pane).

    Has anyone successfully managed to do this, of have any ideas on effective ways to achieve it without resorting to Javascript?

  2. #2
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you'll find your answer here.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    New Zealand
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gary.turner View Post
    I think you'll find your answer here.

    cheers,

    gary
    Awesome! Thanks Gary. Just what I was after.

    Hmmm....maybe I should peruse some more quizzes. I might learn something. In fact I might learn a lot of things.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •