Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrollbars and Table Headers

Status
Not open for further replies.

Einstein47

Programmer
Nov 29, 2001
737
US
Hey all,

I have a problem where a page is divided up into two sections, search input at the top of the page and a table holding the search results at the bottom. The table has a header row to identify each column.

Our problem is that if there are more results than can fit on the remainder of the page, then scrollbars are displayed.

If we do NOTHING to control the scrollbars then the page itself is completely scrollable (meaning the search criteria scrolls off the viewable area of the page). We don't want this.

If we add a
Code:
<DIV style=&quot;height: XXXpx&quot;>
around the table, then the results area scrolls, and the table header can be scrolled out of the viewing window.

If we break the table into two - one simple table with the header row, then the DIV, then the results table. We get what we want (we still have to mess with the column widths so that the header and detail line up, but that is another issue)

My question is: is there a better/easier/preferred way to doing what we want without having 2 separate tables and the DIV container. I'm thinking about THEAD and TBODY, but I don't know 1) how to use them 2) if they can do what we are wanting.

Any comments are welcome. Actual help gets a /images/star.gif Einstein47
(&quot;The only reason I would take up exercise would be so I could hear heavy breathing again.&quot;)
 
I would recommend frames for this. If you have a top frame that doesn't scroll, and a bottom frame that does (both without borders), then you should be able to do what you want. Also, it will make it easier for the users to search, since only the bottom frame will reload if you add a target to your form. If you need any help with this, let me know.

Rick -----------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top