I have the following markup:
<table class="someclass">
<thead>
<tr>
<td>
<div>
<h1>Click to change height</h1>
</div>
</td>
</tr>
</thead>
<tbody>
<tr>(repeated many times)
<td>some text</td><td>some other text</td>
</tr>
</tbody>
</table>
and the following styling:
tbody {
display:block;
overflow:auto;
}
table {
height:200px;
}
currently the <h1>
has some jquery that ultimately changes the height of its parent (and i'd assume the height of the <thead>
.) The <table>
should maintain it's height and the <tbody>
should shrink to fit. currently what I have is working in webkit (chrome and safari) and failing miserably in IE and Firefox. most questions I see have the reverse issue and I am perplexed as to why this is happening.
edit here is the jQuery:
$(".someclass h1").click(function(){
$(this).parent().css("height", "150px");
});
http://jsfiddle.net/kXCX6/2/ (this is behaving the way I want, my code is not behaving this way even though it is structurally identical)