Table freeze question (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


chadb -> Table freeze question (5/8/2008 9:52:35)

Is it possible to freeze a table or cell. I have seen some posts about this, but havn't found anything that helps. I want the top part of my intranet site not to scroll, but I do not want to use frames. Is there a way to do this?

Thanks
Chad




rdouglass -> RE: Table freeze question (5/8/2008 10:41:04)

I frequently put stuff in a div like so:

<div style="height: 200px; overflow: scroll;">
Lots of stuff here.
</div>

Works most times for me; hope it does for you.




chadb -> RE: Table freeze question (5/8/2008 13:58:25)

quote:

<div style="height: 200px; overflow: scroll;">


Well that is close, but I need to bottom section to scroll while the top section does not.




rdouglass -> RE: Table freeze question (5/8/2008 14:27:22)

I knew that was coming...[;)]

What I do is to make 2 tables essentially; one having just the table header stuff above (and aligned with) the <div> and the second one inside the <div> having just the data.

Did that make sense? Help any?




chadb -> RE: Table freeze question (5/8/2008 14:39:34)

quote:

<div style="height: 200px; overflow: scroll;">
Lots of stuff here.
</div>


OK, I am a bit confused, here is a sample that I tried, what am I doing wrong?

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Lots of stuff here</title>
</head>

<body>

<table border="1" width="100%" id="table1">
<tr>
<td> <div style="height: 200px; overflow: scroll;">
Lots of stuff here.
</div> </body>
</td></td>
</tr>
</table>
<table border="1" width="100%" id="table2" height="44">
<tr>
<td>
 </tr>
</table>


</html>




BobbyDouglas -> RE: Table freeze question (5/8/2008 15:34:51)

You have your </body> tag inside your table. That should come right before your </html> tag. You also didn't close your <td>, and a couple other html errors.

You may want to put the table inside the div, as opposed to the div inside the table.




chadb -> RE: Table freeze question (5/8/2008 15:59:02)

OK, I changed to this, but still not working correctly. Maybe there is a way to sroll the bottom table?

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Lots of stuff here</title>
</head>

<body>
<div style="height: 200px; overflow: scroll;">
<table border="1" width="100%" id="table1">
<tr>
<td> 
Lots of stuff here.

</td></td>
</tr>
</table>
</div>
<table border="1" width="100%" id="table2" height="44">
<tr>
<td>
<p> </tr>
</td>
</table>
</body>
</html>




rdouglass -> RE: Table freeze question (5/8/2008 16:50:18)

<table border="1" width="100%" id="table1"> 
<tr> 
<td>  
Table Head 1</td>
<td>  
Table Head 2</td>
</tr> 
</table> 

<div style="height: 200px; overflow: scroll;"> 

<table border="1" width="100%" id="table2">
<tr> 
<td>  
Table Cell 1a</td>
<td>  
Table Cell 1b</td>
</tr>
<tr>
<td>  
Table Cell 2a/td>
<td>  
Table Cell 2b</td>
<td>
</tr>
<tr>
Table Cell 3a</td>
<td>  
Table Cell 3b</td>
<td>  
</tr>
</table> 

</div> 


That look any better?




Mane -> RE: Table freeze question (5/8/2008 20:08:52)

What about position:fixed? Of course this will not work in versions of certain browsers which shall remain nameless...




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.882813E-02