PDA

View Full Version : a question about tables, scrolling in a cell of a table, etc..


me-so-sleepy
05-25-2003, 12:56 PM
oke i have been having some problems with the layout of my website.
basically i have in tables and whenever i stick content into the middle cell it changes size.. how can i make it possible so that it doesnt ruin the size and possibly has something similar to this http://www.urbanchaosvideos.com/index2.html where it has a scrolling thing that all fits inside the middle cell.. so basically it stays shape the whole time

on my site.. http://www.504hrs.com/tests/news.htm in the news section its ok where everything is.. its the same on gigs, video, pictures, lyrics, special, forums.. but thats because there is no content in them.. in the discography section it all went out of line when i added an image to the cell and in the audio section when i added some links.. so thats where the scrolling thing comes into play, because if its because it wont fit in a cell then it needs to have a scrolling thing..

i doubt that made much sense so sorry.. =/ im just really stuck heh

Matt

Mr J
05-25-2003, 01:14 PM
Something like this



<P><table border="1" width="400" height="200" cellpadding="1" cellspacing="0" >
<tr><td height="30" align="center">Header</td></tr>
<tr>
<td valign="top">
<div style="width:100%;height:100%;overflow-x:hidden;overflow-y:auto">
<P>This first example shows how you can scroll the contents of a table with a single cell.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>The End
</div></td>
</tr>
<tr><td height="30" align="center">Footer</td></tr>
</table>



For a couple of more examples see

www.huntingground.freeserve.co.uk/scripts/tablescroll.htm

me-so-sleepy
05-25-2003, 01:52 PM
oke i tried that an it works :)

buuuuuuut i am now confused with the tables layout.. like everything is not where it should be an i have searched the source for making changes and im still stuck..

i need to make this..

http://www.504hrs.com/tests/news-scroll-test1.htm


look like this...

http://www.504hrs.com/tests/news.htm


can you see where the problem is? its the bottom left cell it wont line up with the rest.. how do i solve it?

thanks

Matt

Mr J
05-25-2003, 04:49 PM
See how it looks now

Download the zip

me-so-sleepy
05-25-2003, 05:58 PM
yea thats brilliant!
there is one more thing.. its not THAT important but if it can be sorted somehow that would be amazing..
the scrollbar is at the very top and the top arrow is overlaping a red line which is part of the background image.. is it possible to make the scrollbar go down by the slightest amount..

thanks

Matt

Mr J
05-25-2003, 06:09 PM
Add padding to the style attribute already in the TD cell containing the DIV.

I have added padding-top , padding-bottom, and padding-right with a value of 1 pixel.

Adjust to suit.



<TR>
<TD vAlign=top style="HEIGHT: 50%;padding-top:1;padding-bottom:1;padding-right:1" colSpan=2 background="middle.gif">
<DIV style="OVERFLOW-Y: auto; OVERFLOW-X: hidden; WIDTH: 100%; HEIGHT: 100%;padding-left:50">
<P>This first example shows how you can scroll the contents of a table with a single cell.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>Dummy Text.
<P>The End </P>
</DIV>
</TD>
</TR>

me-so-sleepy
05-25-2003, 06:24 PM
thank you soooooooooo much for all your time and help :) :thumbsup: