[SOLVED] scrollbar to a div, i must be missing something

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
snowball
Forum Members
Forum Members
Posts: 53
Joined: Tue Jan 05, 2010 10:35 am

[SOLVED] scrollbar to a div, i must be missing something

Post by snowball »

Hi guys,

I have a question regarding scrollbars...

I never used them before, but now I need a scrollbar and it doesnt work out..

I have a collection of images in a collumn, the only thing I need is for that content to be vertical scrollable so the page doesn't stretches out..

I tried several jquery scrollbars, overflow options in css, for over 2 days now...

There must be a simple solution, hope one can help me out here getting this work

Thanks in advance!
Last edited by snowball on Thu Sep 22, 2011 7:37 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: scrollbar to a div, i must be missing something simple

Post by RonnyK »

I used it, with jscrollpane.

See http://jscrollpane.kelvinluck.com/ for the logic.

Ronny
snowball
Forum Members
Forum Members
Posts: 53
Joined: Tue Jan 05, 2010 10:35 am

Re: scrollbar to a div, i must be missing something simple

Post by snowball »

Thats exactly the site wich I am on, but I cannot get it to work :s

I have a lot of small images, wich all uses jqzoom, innerzoom and that works fine, but now I want to put al that content to be scrollable...

I tried the common way by using the jquery module and added the plugin and the script to load in the header...no result...next I tried this method : http://forum.cmsmadesimple.org/viewtopi ... 20&t=55717 also no results...

Gonna take a coffee and retry again :-(

Thanks for your quick reply!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: scrollbar to a div, i must be missing something simple

Post by RonnyK »

I use it both on http://ronnyk.dyndns.org:8080/ah-bh/ and on http://ronnyk.dyndns.org:8080/ah-hhm/

I call...
<__script__ type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jq ... ery.min.js">
</__script>
<__script__ type="text/javascript" src="uploads/JQuery/jquery.mousewheel.js"></__script>
<__script__ type="text/javascript" src="uploads/JQuery/jquery.jscrollpane.min.js"></__script>
<__script__ type="text/javascript" id="sourcecode">
$(function()
{
$('#main').jScrollPane();
$('#sidebar').jScrollPane();
});
</__script>
there inside the head-area of the template, where the two divs that I want scrollable are put explicitly.

Make sure that you do NOT call jquery itself multiple times.

If you give me a link (or via PM) I can take a look at the site. If you want I can take a look in the backend as well.

Ronny
snowball
Forum Members
Forum Members
Posts: 53
Joined: Tue Jan 05, 2010 10:35 am

Re: scrollbar to a div, i must be missing something simple

Post by snowball »

Thanks !!! I will take a look at your reply and try it over again, if it doesnt work I'll pm you!
Last edited by snowball on Thu Sep 22, 2011 1:15 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: scrollbar to a div, i must be missing something simple

Post by RonnyK »

You posted just after I did. Did you see the earlier remark?
snowball
Forum Members
Forum Members
Posts: 53
Joined: Tue Jan 05, 2010 10:35 am

Re: scrollbar to a div, i must be missing something simple

Post by snowball »

Yep I noticed, thanks for that, I just did exactly what you showed me, but nothing happens...yet :s
snowball
Forum Members
Forum Members
Posts: 53
Joined: Tue Jan 05, 2010 10:35 am

Re: scrollbar to a div, i must be missing something simple

Post by snowball »

Ok solved by great help of Ronny K.

Don't know how to describe exactly, but it works perfect! ;D
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: [SOLVED] scrollbar to a div, i must be missing something

Post by spcherub »

Just curious, why didn't you just set overflow:scroll (assuming you have set with and height) in the style for the div containing your images instead of using JS solutions?

S
Post Reply

Return to “Layout and Design (CSS & HTML)”