You are here: Re: Table that scrolls if too long BUT first row is static? « HTML « IT news, forums, messages
Re: Table that scrolls if too long BUT first row is static?

Posted by Mark Parnell on 06/16/05 10:11

Previously in alt.html, Noozer <dont.spam@me.here> said:

> I've got an ASP generated form that outputs the results to a table. The
> table is contained within a DIV of a fixed height. This is to avoid a page
> that is too long when there are a lot of results returned. This works fine,
> except that the headings (first row in the table) scrolls with the rest of
> the output.
>
> Is there a simple way to keep this first row from scrolling?

I have seen it done before, but I don't have the URL.

OTTOMH: simplified version, untested:

thead {position: fixed;}

<table>
<thead>
<tr>
<th></th> etc.
</tr>
</thead>
<tbody>
<tr><td></td></tr> etc.
</tbody>

Won't work in IE, of course. :-( You may even be able to get rid of the
<div> and just add tbody {height: 20em; overflow: scroll;} to your CSS.
Again, not tested. :-)

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация