You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by CL <em...@yahoo.com> on 2008/02/04 21:16:07 UTC

html table with fixed headers and scrollable rows?

Hi All,

Is there a way for tomahawk data tables to get fixed headers and scrollable rows like the one shown at this URL: 

http://www.imaputz.com/cssStuff/bigFourVersion.html#
or at 
http://www.cssplay.co.uk/menu/tablescroll.html

Any help is appreciated. Thanks.








      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: html table with fixed headers and scrollable rows?

Posted by Grant Smith <wo...@gmail.com>.
Yes,

use the following CSS:

div.tableContainer {
    clear: both;
    border: 1px solid #963;
    height: 505px;
    overflow: hidden;
    width: 976px
}

div.tableContainer thead tr {
    position: relative;
    display: block;
    width: 960px;
}

div.tableContainer tbody {
    display: block;
    height: 450px;
    overflow: auto;
    width: 976px;
}

Then wrap your datatable in a div, like this:


<div id="tableContainer" class="tableContainer">
   <t:dataTable.....>
        <t:column style="width:60px; padding-left: 3px;"
headerstyle="width:60px;">
    </t:dataTable>
</div>

Note the style on the column is just an example. the left padding is quite
important because the scrollbar pushes your content inwards and then it
doesn't quite line up with the headings. I couldn't find any easier way than
this.


On Feb 4, 2008 12:16 PM, CL <em...@yahoo.com> wrote:

> Hi All,
>
> Is there a way for tomahawk data tables to get fixed headers and
> scrollable rows like the one shown at this URL:
>
> http://www.imaputz.com/cssStuff/bigFourVersion.html#
> or at
> http://www.cssplay.co.uk/menu/tablescroll.html
>
> Any help is appreciated. Thanks.
>
>
>
>
>
> ------------------------------
> Never miss a thing. Make Yahoo your homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>



-- 
Grant Smith