All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
hi there i have a store which have sticky side bar its working fine but the issue is its heading is not sticky with it my url is sundip1.myshopify.com. i have used following code for sticky sticky sidebar
<style> @media (min-width: 750px) {
.index-section .grid--full {
max-width: calc(1220px - 330px);
float: right;
}
#shopify-section-footer {
width: 100%;
overflow: hidden;
}
}
</style>
Solved! Go to the solution
This is an accepted solution.
try this on add edit code > css file
div#top-home-blocks .sidebar-collections {
position: fixed;
width: 275px;
}
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
Contect On My Mail :-raj.s.webdeveloper@gmail.com OR My Site:-Link
Hello @BDPK
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
@media (max-width: 767px) {
.index-section .grid--full {
max-width: calc(1220px - 330px);
float: right;
}
#shopify-section-footer {
width: 100%;
overflow: hidden;
}
.sticky-sidebar {
position: sticky !important;
top: 0; /* Adjust this value if you have a header or other elements above */
}
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
tried this code but nothing happened
This is an accepted solution.
try this on add edit code > css file
div#top-home-blocks .sidebar-collections {
position: fixed;
width: 275px;
}
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
Contect On My Mail :-raj.s.webdeveloper@gmail.com OR My Site:-Link
thanks for your help