You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

26. July 2010, 22:51:19

drworm

Posts: 1522

Scrollable tbody?

Is there a technique that allows for a table to have a fixed height such that thead and tfoot content is ablways visible whilst tbody scrolls?

I can achieve this in firefox as simply as:
table tbody { height:200px; overflow:scroll; }


Surprisingly, this doesn't do anything in Opera. Does Opera require some other properties to be set, or does Opera simply now allow for scrollable tbody?
Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

27. July 2010, 00:42:13

Vectronic

... ... ...

Posts: 2538

Set the display attribute to something else, block, inline-block, etc.
tbody{display:inline-block;height:200px;overflow:auto;}

Such as <a href="ftp://76.11.58.186/Junk/example.htm">this</a>

27. July 2010, 07:21:25

drworm

Posts: 1522

Originally posted by Vectronic:

Set the display attribute to something else, block, inline-block, etc.

tbody{display:inline-block;height:200px;overflow:auto;}

Such as this


I probably should have mentioned that I want tbody scrollable because a typical table also also has a thead and tfoot. Changing the display property breaks the table layout when using multiple columns with thead and or tfoot.
Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

27. July 2010, 11:16:08

Frenzie

Posts: 14476

http://www.456bereastreet.com/archive/200704/how_to_prevent_html_tables_from_becoming_too_wide/

Could this help?
Intelligent alien life does exist, otherwise they would've contacted us. — CalendarExtend Opera

27. July 2010, 11:43:59

drworm

Posts: 1522

Originally posted by Frenzie:

http://www.456bereastreet.com/archive/200704/how_to_prevent_html_tables_from_becoming_too_wide/

Could this help?


That's very useful information and I should be able to make good use of it.

I would still like to have a scrollable tbody, but I think if there was answer I would have found it already. This is the first time I've found a situation where Firefox was able to do something Opera couldn't, in terms of HTML/CSS support. Especially when the bahviour is suggested by W3C:

Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot.

Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

27. July 2010, 12:39:05

desic

Not a number, a free man

Posts: 302

If this really is something which Opera hasn't implemented correctly, you should submit it as a bug.
It was a bright, cold day in April...

27. July 2010, 22:16:05

drworm

Posts: 1522

Originally posted by desic:

If this really is something which Opera hasn't implemented correctly, you should submit it as a bug.

I don't think it qualifies as a bug. It's behaviour W3C suggests browsers 'could' support, but doesn't suggest how it 'should' work or if it's behaviour that should be controllable using CSS. The doc for overflow doesn't state that it applies to table-groups.
Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

Forums » General Opera topics » Opera and cross-browser Web design