View Single Post
Old 3rd November 17, 01:25 AM   #2
spikemeister
WLC Lover
 
spikemeister's Avatar
 
Join Date: Mar 2008
Location: Ireland
Posts: 54
Default Re: Using CSS how can I vertically scroll content in 1 table column w/browser scrollb

Hi we wont go into the whole tables for layout thing. If I understand correctly you want to force the use of the scrollbar if the content is too big for the space. Currently your table will expand with the content. You need to first define a height otherwise the scrollbar will never work.
Unfortunately for you you will have to try a little css. Place a div with fixed dimensions inside the cell you want to use.

The following will scroll both x and y

Code:
.content {
    width: 100px;
    height: 200px;
    overflow: scroll;
}
The following will do only vertical scrolling

Code:
.content {
    width: 100px;
    height: 200px;
    overflow-y: auto;
}
Insert a div in the cell of the table
Code:
<div class="content">
put lots of of text in here to try it out
</div>
If you don't format your text properly either solution may force the horizontal scrollbar.

There are lots of better ways to display content however I hope this answers your question.
spikemeister is offline   Reply With Quote