SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a long table of information with a heading at the top. Is there a script to make the headings always stay at the top of my screen while the table information scrolls by.

    I hope this makes sense.

    Thanks
    Dianna

  2. #2
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi Diana,

    You could do it with layers and css but probably the easiest way is to use 'frames'. You need a frameset document for your base (index.html)

    Code:
    <!doctype html public "-//w3c//dtd html 3.2//en">
    
    <html>
    
    <head>
    <title>(This is the Frameset)</title>
    </head>
    
    <frameset rows="30,*">
    
    <frame src="top.html" name="top">
    <frame src="maintable.html" name="main">
    
    </frameset> 
    
    
    </html>
    This document splits the screen into 2 rows. A small 30 pixels high one at the top, and another below it taking up the rest.

    Then you need two html docs to put in your the 'windows' you've created.

    One might be called 'top.html' (that's what I've called it in my example) and would have just the heading part of your table. The other one would be the tabled document you already have (without the heading now). In my example above I called it 'maintable.html' but you can call it what ever you want, as long as you change it in the frameset document too.

    Then you just browse the frame document and it will splice the other two documents together for you.

    Give it a try and see how you go.
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks Alex! I didn't even think of it that way. I will give that a try.


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
  •