I have a view that is a long list of node titles in alphabetical order.

It is put into a sidebar and stretches the page height since the list has gotten very long.

Is there a way for me to add a vertical scroll bar to this list. I see the pager option, is there a way to get a scroll bar option and set the height?

If this has to be done with CSS I do not know how to do this as I am a bit of a noob. Anyone with detailed instructions?

Comments

gforce301’s picture

You need to set the height of the block element containing the view.
http://www.w3.org/TR/CSS21/visudet.html#propdef-height

You then need to set the overflow property to scroll.
http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

jsnoles49’s picture

Can you direct me to where this element would be?

gforce301’s picture

You will have to look in source of the page. Either view source from the browser or use a tool like Firebug. The containers are dynamically named by views, so without a link to your page I can not, unfortunately, tell you what it is.

calefilm’s picture

In view:

css class: override

add field and in rewrite field output add:

<table>
<td id="content-containertable" class="override">
<div style=”overflow: auto;”>[body]</div>
</td>
</table>

add to theme stylesheet:

#content-containertable.override{
 padding: 10px 10px 10px 10px;
}

#content-containertable.override div{
  height:200px;
  overflow:auto;
    position: relative;
}

reference: http://www.daniweb.com/web-development/web-design/html-and-css/threads/7...
reference: http://css-tricks.com/scrollfollow-sidebar/