myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Smith" <work.gr...@gmail.com>
Subject Re: html table with fixed headers and scrollable rows?
Date Mon, 04 Feb 2008 23:45:54 GMT
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 <emailismylife@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

Mime
View raw message