CSS and Tables |
![]() ![]() |
CSS and Tables |
Dec 31 2008, 06:05 PM
Post
#1
|
|
![]() Member ![]() ![]() Group: Member Posts: 17 Joined: Jul 2008 Member No: 670,133 |
Can I use CSS to make a cell in a table scrollable, if so what code should I use?
|
|
|
|
Jan 13 2009, 06:38 PM
Post
#2
|
|
|
Member ![]() ![]() Group: Member Posts: 22 Joined: Nov 2006 Member No: 483,287 |
Not sure if you are still looking for an answer to this but...
You could use an iframe to do this, but then the content for the cell would need to be in a seperate HTML document. You would not need CSS for this. The code for this would be something like: CODE <iframe src="cellcontents.html" name="scrollablecell" scrolling="auto" align="top" width="300" height="300" marginwidth="0" marginheight="0" frameborder="0"></iframe> You could also use a DIV like so... CODE <style type="text/css"> .scroller { overflow: auto; width: 300px; height: 300px; } </style> CODE <td><div class="scrollingcell">Cell contents</div></td> Hope that helps! |
|
|
|
Jan 13 2009, 10:00 PM
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 5,880 Joined: Nov 2007 Member No: 593,382 |
I tried and it didnt work. Its not possible. I would suggest putting down tables and starting to use divs! Tables are not very proffesional.
The guy above showed a way but you could also just do this: CODE <div style="height:100px; overflow:auto;">Scrolling stuff here!</div> It will only scroll if you put enough text though.And you can change the height by adjusting "height:100px;" in the code. |
|
|
|
Jan 27 2009, 03:49 PM
Post
#4
|
|
|
Irrisistable Cabbages. ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 549 Joined: Nov 2007 Member No: 589,355 |
I tried and it didnt work. Its not possible. I would suggest putting down tables and starting to use divs! Tables are not very proffesional. The guy above showed a way but you could also just do this: CODE <div style="height:100px; overflow:auto;">Scrolling stuff here!</div> It will only scroll if you put enough text though.And you can change the height by adjusting "height:100px;" in the code. I'd either use that or the good old textarea tag. CODE textarea {height: XXpx; width: XXpx;} |
|
|
|
Feb 11 2009, 04:21 PM
Post
#5
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
Hmmmm....try adding a height and overflow: auto; property into your table, tr, or td tag. I'm not sure though. Try it.
Like this? CODE <table style="height:###px; overflow: auto;">TEXT N STUFF</table>
|
|
|
|
![]() ![]() |