Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Separate scroll bar for categories.

Separate scroll bar for categories.

Views: 1,103

Results 1 to 9 of 9
14 May 2012, 10:40 AM
#1
elvira avatar

elvira

New Zenner

Join Date:
Feb 2009
Location:
Norway
Posts:
30
Plugin Contributions:
0

Separate scroll bar for categories.

Hello,

I have searched the forum, but couldn't find the answer anywhere. I would like to have a scroll bar inside the centercolumn for categories with multiple listings. So that the user can scroll down to view the products but the header would always be on top and the sidebar wouldn't move.

Here's the link the page as it is now: http://shopforhealthandbeauty.co.uk/ - So I want the navigation bar on the right hand side between the centercolumn content and the side bar. Is it possible?

Thank you,
Elvira.

14 May 2012, 1:43 PM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Separate scroll bar for categories.

could try adding this to your stylesheet

div#indexProductList {
height:600px;
overflow:scroll;
}

15 May 2012, 8:08 AM
#3
elvira avatar

elvira

New Zenner

Join Date:
Feb 2009
Location:
Norway
Posts:
30
Plugin Contributions:
0

Re: Separate scroll bar for categories.

It worked! Thank you very much! :smile:
Is it possible to get rid of the bottom scroll? Here's how it looks now: http://shopforhealthandbeauty.co.uk/

15 May 2012, 10:42 AM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Separate scroll bar for categories.

change:
overflow:scroll;

to:
overflow-x:hidden;
overflow-y:scroll;

15 May 2012, 2:30 PM
#5
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Separate scroll bar for categories.

By doing that you've made your site not work on mobile phones, as scroll bars don't work on a touch screen. Currently on my Android phone you can only see the first three products.

16 May 2012, 8:28 AM
#6
elvira avatar

elvira

New Zenner

Join Date:
Feb 2009
Location:
Norway
Posts:
30
Plugin Contributions:
0

Re: Separate scroll bar for categories.

dgent:

By doing that you've made your site not work on mobile phones, as scroll bars don't work on a touch screen. Currently on my Android phone you can only see the first three products.

Oh, thank you for letting me know. Hmmm, I have to rethink this then.

17 May 2012, 7:44 AM
#7
elvira avatar

elvira

New Zenner

Join Date:
Feb 2009
Location:
Norway
Posts:
30
Plugin Contributions:
0

Re: Separate scroll bar for categories.

Is there any code that would exclude scroll bar for mobile browsing?
Something like: if PC - use scroll bar, if mobile - don't use scroll bar.

17 May 2012, 8:15 AM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Separate scroll bar for categories.

Separate stylesheets, perhaps, configured to apply to different devices.

You may also want to look at the VIEWPORT TAG. (Search Google).

17 May 2012, 9:23 AM
#9
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Separate scroll bar for categories.

Elvira:

Is there any code that would exclude scroll bar for mobile browsing?
Something like: if PC - use scroll bar, if mobile - don't use scroll bar.

Its not worth the risk, as many people run a desktop user agent on their phones so would bring up the scroll bar version.