View Full Version : Change table>tbody dinamically

06-02-2009, 12:13 PM

Here's my problem:

I've got a CSS like:

table>tbody {
overflow: auto;
height: ...


<div id="table" class="tableContainer">
<table cellspacing="0">

Is it possible to change the height of '<tbody>'?

For example:

var x = document.getelemen(s)tby.... something??
x.stlye.height = 100 + 'px';

the css part sould be untouched (it's part of a fixed header table solution)

Thank you

06-02-2009, 12:29 PM
If you can change the height of tbody with CSS then you can change it with JavaScript, too, yes.

Are you actually asking if or how it’s possible to change it?

06-02-2009, 12:35 PM
Sorry, my question is how it's possible to change it with javascript.

Thanks for the help

06-02-2009, 01:26 PM
Problem solved.

If anybody interested:

var tbody = document.getElementsByTagName('tbody')[0]
tbody.style.height = 1000 + 'px';

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum