Old 06-06-2008, 12:29   #1 (permalink)
techunar
Registered User
 
Join Date: May 2008
Posts: 25
Overflow:scroll inside Tbody!

Hello,

I have a markup like this inside a table:

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

I want to make a fixed height of my TBODY, and want to have a overflow-y: scroll... any idea guys?? I am trying trying and trying... I need this for for Firefox/Safari and IE....

Looking forward!

-techunar
  Reply With Quote
Old 06-06-2008, 14:20   #2 (permalink)
teehoi
baron zen
 
teehoi's Avatar
 
Join Date: May 2008
Location: New Jersey, US
Posts: 99
  Reply With Quote
Old 06-06-2008, 15:06   #3 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
Uh, this doesn't necessarily mean he's using it as a layout device. Tables are perfectly fine for tabular data.

This might be helpful: Pure CSS Scrollable Table with Fixed Header

"overflow-y" isn't a valid CSS property. Try using overflow:auto; and declaring a height for tbody.
  Reply With Quote
Old 06-06-2008, 17:47   #4 (permalink)
karmedic
id
 
Join Date: May 2008
Location: Ottawa
Posts: 229
further to pgo's comment - this markup works for me:

Code:
<table style="width: 400px;"> <thead> <tr> <th> head </th> </tr> </thead> <tbody style="height: 100px; overflow: auto;"> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> <tr> <th> .. </th> </tr> </tbody> </table>
  Reply With Quote
Old 06-06-2008, 17:49   #5 (permalink)
techunar
Registered User
 
Join Date: May 2008
Posts: 25
This markup and what PGO has shown just works for FF, all are breaking on IE and Safari.

However, PGO the link you mentioned, I visited it before, I wonder how it does, it looks fine when I visit it, but when I integrate these tbody styles this doesn't works on my application.

any more ideas.. ?
  Reply With Quote
Old 06-06-2008, 18:43   #6 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
Use the CSS from the link. It has IE fixes in it.
  Reply With Quote
Old 08-06-2008, 11:55   #7 (permalink)
techunar
Registered User
 
Join Date: May 2008
Posts: 25
No PGO, worked hard, no solution yet...
  Reply With Quote
Old 10-06-2008, 04:58   #8 (permalink)
spiral
dt newbie
 
spiral's Avatar
 
Join Date: May 2008
Posts: 83
I managed to tweak the imaputz "big 4" technique so it works with more browsers
I have a working demo you can take a look at:
monolinea.com/clients/csstests/tablescroll.html

tested and working in:
  • ie6
  • ie7
  • ff2
  • safari 3
  • opera 9

(sorry, i still cannot post links )
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet