always visible colunmn headers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roedy Green

    always visible colunmn headers

    In a spreadsheet you can arrange that column headers are always
    visible no matter how much your scroll the table itself. What is the
    best way to get this effect in CSS?. Does it require frames or is
    there a better way?

    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.


    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
  • Mason A. Clark

    #2
    Re: always visible colunmn headers

    On Tue, 28 Jun 2005 02:15:06 GMT, Roedy Green <look-on@mindprod.com .invalid>
    wrote:
    [color=blue]
    >In a spreadsheet you can arrange that column headers are always
    >visible no matter how much your scroll the table itself. What is the
    >best way to get this effect in CSS?. Does it require frames or is
    >there a better way?[/color]

    Someone will offer a pure CSS way.

    I use tables and do it this way:

    #topBar { POSITION: fixed; POSITION: expression("abs olute");
    TOP: 0em; TOP: expression(pars eInt(document.b ody.scrollTop +0));

    <div id="topBar">
    Frontal Lobe<sup>(R)</sup>&nbsp;&nbsp ;Home Page
    </div>

    ( you can tinker with the "0" -- someone here worried about it )

    See it working at:



    Mason C

    Comment

    • Gus Richter

      #3
      Re: always visible colunmn headers

      Roedy Green wrote:[color=blue]
      > In a spreadsheet you can arrange that column headers are always
      > visible no matter how much your scroll the table itself. What is the
      > best way to get this effect in CSS?. Does it require frames or is
      > there a better way?
      >[/color]

      <http://www.home.golden .net/~richterf/Michael/Special.html>
      Requires a Gecko based browser to view properly (overflow:auto; applied
      to tbody).

      --
      Gus

      Comment

      • Eric Kenneth Bustad

        #4
        Re: always visible colunmn headers

        In article <HqWdnebHx5WzZl 3fRVn-rg@golden.net>,
        Gus Richter <gusrichter@net scape.net> wrote:[color=blue]
        >Roedy Green wrote:[color=green]
        >> In a spreadsheet you can arrange that column headers are always
        >> visible no matter how much your scroll the table itself. What is the
        >> best way to get this effect in CSS?. Does it require frames or is
        >> there a better way?[/color]
        >
        ><http://www.home.golden .net/~richterf/Michael/Special.html>
        >Requires a Gecko based browser to view properly (overflow:auto; applied
        >to tbody).[/color]

        Any suggestion as to how to get rid of that stupid horizontal scrollbar?

        --
        = Eric Bustad, Norwegian bachelor programmer

        Comment

        • GĂ©rard Talbot

          #5
          Re: always visible colunmn headers

          Roedy Green wrote :[color=blue]
          > In a spreadsheet you can arrange that column headers are always
          > visible no matter how much your scroll the table itself. What is the
          > best way to get this effect in CSS?. Does it require frames or is
          > there a better way?
          > [/color]


          Cross-browser scrolling tbody:


          Gérard
          --
          remove blah to email me

          Comment

          • Brett Merkey

            #6
            Re: always visible column headers

            "Roedy Green" wrote :[color=blue]
            > In a spreadsheet you can arrange that column headers are always
            > visible no matter how much you scroll the table itself. What is the
            > best way to get this effect in CSS?. Does it require frames or is
            > there a better way?[/color]

            Assuming your purpose is to display data and not to hack a layout,
            the only CSS-based implementation I have confidence in that:
            1) works in the most common Windows browsers
            2) does not involve extra tables or frames
            3) does not involve turgid JavaScripts
            4) prints well with repeating headers and footers
            5) is drop-tested in production environments over several years

            is this one:




            Comment

            • Gus Richter

              #7
              Re: always visible colunmn headers

              Eric Kenneth Bustad wrote:[color=blue]
              >
              > Any suggestion as to how to get rid of that stupid horizontal scrollbar?[/color]

              What I have done is to place the tbody content inside a table, placed
              this table inside a div and placed the div inside tbody. I removed
              overflow:auto from tbody and applied it to the div. The div then is
              scrollable instead of tbody and presents only a vertical scrollbar.
              These changes worked for me:

              tbody {height: 10em;}

              <tbody>
              <tr><td colspan="3">
              <div style="height:1 0em;overflow:au to;">
              <table style="width:10 0%;">
              tbody content
              </table>
              </div>
              </td></tr>
              </tbody>

              The cell widths need to be defined to equal their width for the two tables.

              --
              Gus

              Comment

              • Eric Kenneth Bustad

                #8
                Re: always visible colunmn headers

                In article <NuydncXc3OAM01 _fRVn-qw@golden.net>,
                Gus Richter <gusrichter@net scape.net> wrote:[color=blue]
                >Eric Kenneth Bustad wrote:[color=green]
                >>
                >> Any suggestion as to how to get rid of that stupid horizontal scrollbar?[/color]
                >
                >What I have done is to place the tbody content inside a table, placed
                >this table inside a div and placed the div inside tbody. I removed
                >overflow:aut o from tbody and applied it to the div. The div then is
                >scrollable instead of tbody and presents only a vertical scrollbar.
                >These changes worked for me:
                >
                >tbody {height: 10em;}
                >
                ><tbody>
                > <tr><td colspan="3">
                > <div style="height:1 0em;overflow:au to;">
                > <table style="width:10 0%;">
                >tbody content
                > </table>
                > </div>
                > </td></tr>
                ></tbody>
                >
                >The cell widths need to be defined to equal their width for the two tables.[/color]

                Well, yes, it is pretty easy if one is willing to set the column
                widths explicitly. One *would* often prefer not to do that.

                --
                = Eric Bustad, Norwegian bachelor programmer

                Comment

                • Mason A. Clark

                  #9
                  Re: always visible colunmn headers

                  On Tue, 28 Jun 2005 02:15:06 GMT, Roedy Green <look-on@mindprod.com .invalid>
                  wrote:
                  [color=blue]
                  >In a spreadsheet you can arrange that column headers are always
                  >visible no matter how much your scroll the table itself. What is the
                  >best way to get this effect in CSS?. Does it require frames or is
                  >there a better way?[/color]

                  This question seems to appear frequently. I suspect it's fear of
                  javascript that keeps it alive.

                  http://masonc.home.netcom.com has what you want.

                  Javascript calculations are active even though javascript is set OFF
                  in the browser. At least that's the way it seems to me.

                  The trick is:

                  #topBar { POSITION: fixed; POSITION: expression("abs olute");
                  TOP: 0em; TOP: expression(pars eInt(document.b ody.scrollTop +0));

                  (don't flame me for the "0" -- play with it if you wish)

                  Mason C

                  Comment

                  • Gus Richter

                    #10
                    Re: always visible colunmn headers

                    Eric Kenneth Bustad wrote:[color=blue][color=green]
                    >>The cell widths need to be defined to equal their width for the two tables.[/color]
                    >
                    > Well, yes, it is pretty easy if one is willing to set the column
                    > widths explicitly. One *would* often prefer not to do that.[/color]

                    You don't have to. Try the code I have given and you will note that it
                    performs as you asked; without the horizontal scrollbar.

                    The line about the cell widths was an after thought. If you try my demo
                    and incorporate the code mentioned, you will note that the columns for
                    the two tables do not line up. It's up to you if you are satisfied with
                    that.

                    --
                    Gus

                    Comment

                    • http://www.drshmooz2001@yahoo.com

                      #11
                      Re: Starting my Web Page.

                      I would like to set up a webpage on the internet does any one have any advise on how to
                      go about doing this. I know how to read and write html and know a little about css as it
                      relates to the previous. To I need to open a account for a ftp and what do I do to make
                      sure I can protect other peoples privacy. Since last time that I used lynx which had come
                      packaged with my Global Village modem I see that there are alot of changes including the
                      complexity of the pogram itself.I know a little bit about both html and css and how to write
                      code as well as how to read it. Can I set up a free ftp and if so where? Please feel free
                      to write me at my e-mail address.


                      Comment

                      • Roedy Green

                        #12
                        Re: always visible colunmn headers

                        On Tue, 28 Jun 2005 03:23:51 -0400, Gus Richter
                        <gusrichter@net scape.net> wrote or quoted :
                        [color=blue]
                        ><http://www.home.golden .net/~richterf/Michael/Special.html>
                        >Requires a Gecko based browser to view properly (overflow:auto; applied
                        >to tbody).[/color]

                        That's interesting. The catch is in IE it looks dreadful. I have a
                        similar problem. I have customers with nojava, crappy Java and recent
                        java engines installed. I really should somehow be showing them
                        different html, at least for part of a page.

                        --
                        Bush crime family lost/embezzled $3 trillion from Pentagon.
                        Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.


                        Canadian Mind Products, Roedy Green.
                        See http://mindprod.com/iraq.html photos of Bush's war crimes

                        Comment

                        • Roedy Green

                          #13
                          Re: always visible colunmn headers

                          On Tue, 28 Jun 2005 18:47:56 -0400, Gérard Talbot
                          <newsblahgroup@ gtalbot.org> wrote or quoted :
                          [color=blue]
                          >Cross-browser scrolling tbody:
                          >http://www.gtalbot.org/HTMLJavascrip...lingTBody.html[/color]

                          Unfortunately that page fails in opera 8.0.1. I have reported it.

                          --
                          Bush crime family lost/embezzled $3 trillion from Pentagon.
                          Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.


                          Canadian Mind Products, Roedy Green.
                          See http://mindprod.com/iraq.html photos of Bush's war crimes

                          Comment

                          • Gus Richter

                            #14
                            Re: always visible colunmn headers

                            Roedy Green wrote:[color=blue]
                            >
                            > That's interesting. The catch is in IE it looks dreadful.[/color]

                            By applying the changes which I posted (workaround), by placing another
                            table inside a div and the div inside tbody, it looks and works ok for
                            IE and Opera as well. Additionally, IE requires TR height in the
                            embedded table.

                            Opera has been aware of this overflow:auto problem since several
                            versions ago.

                            --
                            Gus

                            Comment

                            • Roedy Green

                              #15
                              Re: Starting my Web Page.

                              On Thu, 30 Jun 2005 18:53:22 GMT, http://www.drshmooz2001@yahoo.com
                              wrote or quoted :
                              [color=blue]
                              >I would like to set up a webpage on the internet does any one have any advise on how to
                              >go about doing this. I know how to read and write html and know a little about css as it
                              >relates to the previous. To I need to open a account for a ftp and what do I do to make
                              >sure I can protect other peoples privacy. Since last time that I used lynx which had come
                              >packaged with my Global Village modem I see that there are alot of changes including the
                              >complexity of the pogram itself.I know a little bit about both html and css and how to write
                              >code as well as how to read it. Can I set up a free ftp and if so where? Please feel free
                              >to write me at my e-mail address.[/color]

                              Normally you let some ISP set that up for you. there are free ones.

                              See my list http://mindprod.com/jgloss/isp.html


                              To find a utility to let you upload files see


                              IF you don't know how to compose html, you can learn it pretty easily
                              just from the html cheat sheet. see


                              It will point you to some tutorials.

                              You get your webpages working so that you can browse and link between
                              them on your local site. when it is all as you wish, you upload the
                              lot to your ISP.

                              The hard part is getting your CSS style sheets to work. see
                              http://mindprod.com/jgloss/css.html for resources to help there.

                              I am just about to start trying out Dreamweaver, which is what many
                              people are using to compose. I just use a text editor and my own macro
                              generator for intelligent boilerplate.




                              --
                              Bush crime family lost/embezzled $3 trillion from Pentagon.
                              Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.


                              Canadian Mind Products, Roedy Green.
                              See http://mindprod.com/iraq.html photos of Bush's war crimes

                              Comment

                              Working...