I have a table with html code
<style>
div.scroll
{
height:150px;
overflow:auto;
}
table.scrollabl e th
{
position:relati ve;
}
</style>
<div class="scroll">
<table class="scrollab le">
<thead><tr><td> heading1</td><td>heading2 </td><td>heading3 </td></tr></thead>
<tbody>
<tr><td>value 1</td><td>value2</td><td>value3</td></tr>
//repeated 100 times
</tbody>
</table>
</div>
this gives me a nice scrollable table with a fixed header. This is a stand alone.
When I include the same code in my jsp file, I get a scroll bar, but my header is not fixed. My jsp respects the "overflow:a uto" attribute, but does not respect the "position:relat ive" attribute.
I did not add the standard <!doctype.... > here, but its there in my code.
any help?
<style>
div.scroll
{
height:150px;
overflow:auto;
}
table.scrollabl e th
{
position:relati ve;
}
</style>
<div class="scroll">
<table class="scrollab le">
<thead><tr><td> heading1</td><td>heading2 </td><td>heading3 </td></tr></thead>
<tbody>
<tr><td>value 1</td><td>value2</td><td>value3</td></tr>
//repeated 100 times
</tbody>
</table>
</div>
this gives me a nice scrollable table with a fixed header. This is a stand alone.
When I include the same code in my jsp file, I get a scroll bar, but my header is not fixed. My jsp respects the "overflow:a uto" attribute, but does not respect the "position:relat ive" attribute.
I did not add the standard <!doctype.... > here, but its there in my code.
any help?
Comment