Hello all,
Does anyone know a way of making the top navigation bar sticky?
I tried adding "position: fixed;" to the menu CSS but it didn't work.
Any help appreciated!
Thanks
Does anyone know a way of making the top navigation bar sticky?
I tried adding "position: fixed;" to the menu CSS but it didn't work.
Any help appreciated!
Thanks
Ecommerce SEO Expert.
http://matt-jackson.com
It works with position fixed.
add this
tested on default template.
You must edit it's position after..put it where you want
add this
Code: Select all
position: fixed;
width: 980px;
z-index: 999;
You must edit it's position after..put it where you want
Opencart Templates, Modules, Themes & Custom Development | ShopThemer
Thanks for the reply.
I tried adding this to line 320 of the stylesheet, however it screws up the styling of the page the same as before.
I need it to follow you down the page when you scroll (just to repeat the issue).
I am no expert so could you point me in the right direction of the file/location?
Thanks
I tried adding this to line 320 of the stylesheet, however it screws up the styling of the page the same as before.
I need it to follow you down the page when you scroll (just to repeat the issue).
I am no expert so could you point me in the right direction of the file/location?
Thanks
Ecommerce SEO Expert.
http://matt-jackson.com
you want to move it on top o f the page?
please provide the url of your website
please provide the url of your website
Opencart Templates, Modules, Themes & Custom Development | ShopThemer
http://babyplants.co.uk
If you look at my page, the side cart on the right follows you as you scroll.
I want this to happen to the top navigation bar (the categories bar).
If you look at my page, the side cart on the right follows you as you scroll.
I want this to happen to the top navigation bar (the categories bar).
Ecommerce SEO Expert.
http://matt-jackson.com
Ok, I see the problem.
I think I need it to catch it on the way down, ie. it only becomes sticky after you scroll past it.
Something like:
I'll try and add this into the header and see how it works out.
I think I need it to catch it on the way down, ie. it only becomes sticky after you scroll past it.
Something like:
Code: Select all
<?php if ($display) { ?>
<script type="text/javascript">
$(document).ready(function() {
if (!!$('#menu').offset()) {
var stickyTop = $('#menu').offset().top;
$(window).scroll(function(){
var windowTop = $(window).scrollTop();
if (stickyTop < windowTop){
$('#menu').css({ position: 'fixed', top: 0 });
}
else {
$('#menu').css('position','static');
}
});
}
});
</script>
<?php } ?>
Ecommerce SEO Expert.
http://matt-jackson.com
You didn't specify that you want this...you said css and I assumed that you want the menu positioned on top of the page
L.E. If you make menu sticky..the way you want...I believe you need to edit the javascript code for cart module to make it remain under menu
L.E. If you make menu sticky..the way you want...I believe you need to edit the javascript code for cart module to make it remain under menu
Opencart Templates, Modules, Themes & Custom Development | ShopThemer
I found this module that worked great.
http://www.best-byte.com/best-byte-modu ... d-opencart
http://www.best-byte.com/best-byte-modu ... d-opencart
Ecommerce SEO Expert.
http://matt-jackson.com
Who is online
Users browsing this forum: Amazon [Bot] and 148 guests