scrollbar on the left for categories only, static header and footer

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago


I have designed categories with images on the left, now i want to set one scrollbar only for categories and the main page scrollbar should help in scrolling products only.
Also i want static header and footer. This must not effect the design in mobile devices.

Please guide me how can i achieve this?

Thanks in advance!
5 years ago
[email protected] wrote:


I have designed categories with images on the left, now i want to set one scrollbar only for categories and the main page scrollbar should help in scrolling products only.
Also i want static header and footer. This must not effect the design in mobile devices.

Please guide me how can i achieve this?

Thanks in advance!


Hello [email protected],

this is not that simple to achieve, having just a screenshot of the site you want to implement it on I can suggest only a possible solution for you.

You can achieve this with only CSS, but I need to warn you that it will not be very dynamic and before you begin you need to know the exact desktop heights of your Header, Footer and other elements that you want to be fixed on the screen.

Then you need to add the following CSS code to your theme`s styling:

@media all and (min-width:1025px) {
    .side-2,
    .center-2 {
        max-height: calc(100% - SUM_OF_FIXED_ELEMENTS_HEIGHTS);
        overflow: auto;
    }
}


By adding this code, you won't need to actually fix any elements on the screen. The final result should be something like this:



You can play around with the SUM_OF_FIXED_ELEMENTS_HEIGHTS value until <body> scroll on the right of the screen disappears. As you can see from the image, I have removed most of the default elements to match your screenshot and the height I used is 597px.

Hope this helps you achieve your goal.

Best regards,
Valentin.
5 years ago
Hi Nop-Templates.com,

Thanks for your post.

I have done the scroll part by just a little modification, here you can see:


Now here is the final look of my website:



But still i am not able to implement sticky header and footer.Its still confusing for me. Suggest any solution for it please.
5 years ago
[email protected] wrote:
Hi Nop-Templates.com,

Thanks for your post.

I have done the scroll part by just a little modification, here you can see:

Now here is the final look of my website:


But still i am not able to implement sticky header and footer.Its still confusing for me. Suggest any solution for it please.



Hello again [email protected],

in that case, you should do something like:

@media all and (min-width:1025px) {
    .master-wrapper-page {
        position: fixed;
        top: 0;
        left: 0;
        margin-top: HEADER_HEIGHT !important;
        margin-bottom: FOOTER_HEIGHT !important;
        width: 100%;
        height: calc(100% - (HEADER_HEIGHT + FOOTER_HEIGHT));
        overflow: auto; /* if you have custom-scroll you might not need this property */
    }
    .header {
        position: fixed;
        top: 0;
        left: 50%;
        -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        transform: translateX(-50%);
        background: #fff;
    }
    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
    }
}


However, I need to warn you again that this is something done in accordance with the screenshot you have provided and if you need something more accurate you better provide a link to your actual store.

Still, I hope this was helpful.

Best Regards,
Valentin
5 years ago
Thanks again Nop-Templates.com

you can access my store here : http://jiger.online

Also, i am trying to achieve this design:



Any help/suggestion will be highly appreciated.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.