JavierP Posted March 16, 2015 Share Posted March 16, 2015 (edited) Good on design issues I'm green, so I am writing to see if I echais us a hand;)Well the question is this, is I want to make this template http://pavodemo.com/prestabrain/nextstore/hitech/index.phpa float fixed header or header is not exactly as stated. But it also includes the cart in it, down the page down. To always stay as the menu at the top of the page. Type what makes now also the page of this forum prestashop, lowering the header stays up top ... Thanks in advance. I hope for your wonderful help. Regards Edited March 17, 2015 by JavierP (see edit history) Link to comment Share on other sites More sharing options...
moy2010 Posted March 17, 2015 Share Posted March 17, 2015 Please post again the URL, it's corrupted. For fixing the header on top, you have to add a css rule "position:fixed" to the div header. Once you give us your shop url we can help you further. Link to comment Share on other sites More sharing options...
JavierP Posted March 17, 2015 Author Share Posted March 17, 2015 good , sorry. Ya and corrected the url of demo. Thank you for your quick response . I hope your help. Regards JavierP Link to comment Share on other sites More sharing options...
vekia Posted March 17, 2015 Share Posted March 17, 2015 use this js snippet: $(window).scroll(function(){ if ($(this).scrollTop() > 135) { $('#pts-mainnav').addClass('fixed'); } else { $('#pts-mainnav').removeClass('fixed'); } }); and in css styles define class "fixed" .fixed { position:fixed!important; z-index:9999; width:100%; margin:0px; top:0px; }it will work in that way then: 2 Link to comment Share on other sites More sharing options...
JavierP Posted March 17, 2015 Author Share Posted March 17, 2015 many thanks for the help and the video. But would need the cart and the logo will also be included if ... Thanks vekia y moy2010 for the help regards JavierP Link to comment Share on other sites More sharing options...
vekia Posted March 17, 2015 Share Posted March 17, 2015 if you want cart there you have to rebuild your theme there is no other way to achieve it without theme modification. Link to comment Share on other sites More sharing options...
JavierP Posted March 17, 2015 Author Share Posted March 17, 2015 (edited) Many thanks for the help . Then Vekia there would be another way of putting the cart or logo in the fixed header¿ ? Without having to change all the template ... or similar to this website http://mobilprylar.se/ Regards Edited March 17, 2015 by JavierP (see edit history) Link to comment Share on other sites More sharing options...
Totti Posted March 23, 2015 Share Posted March 23, 2015 use this js snippet: $(window).scroll(function(){ if ($(this).scrollTop() > 135) { $('#pts-mainnav').addClass('fixed'); } else { $('#pts-mainnav').removeClass('fixed'); } }); and in css styles define class "fixed" .fixed { position:fixed!important; z-index:9999; width:100%; margin:0px; top:0px; } it will work in that way then: $(window).scroll(function(){ if ($(this).scrollTop() > 135) { $('#pts-mainnav').addClass('fixed'); } else { $('#pts-mainnav').removeClass('fixed'); } }); where paste ? Link to comment Share on other sites More sharing options...
Totti Posted March 25, 2015 Share Posted March 25, 2015 use this js snippet: $(window).scroll(function(){ if ($(this).scrollTop() > 135) { $('#pts-mainnav').addClass('fixed'); } else { $('#pts-mainnav').removeClass('fixed'); } }); and in css styles define class "fixed" .fixed { position:fixed!important; z-index:9999; width:100%; margin:0px; top:0px; } it will work in that way then: where they made these changes ? Link to comment Share on other sites More sharing options...
alexpsc Posted June 25, 2015 Share Posted June 25, 2015 Could someone share the name of the files to implement the js snippet and the CSS style? Thanks Link to comment Share on other sites More sharing options...
vekia Posted June 25, 2015 Share Posted June 25, 2015 global.css and global.js both located in theme directory 1 Link to comment Share on other sites More sharing options...
alexpsc Posted June 26, 2015 Share Posted June 26, 2015 Thanks for the info Vekia. It worked Best regards, Link to comment Share on other sites More sharing options...
vekia Posted June 26, 2015 Share Posted June 26, 2015 may i know the url to see your website and check how it works? Link to comment Share on other sites More sharing options...
Damiano Posted July 14, 2015 Share Posted July 14, 2015 thanks at all... i've tried but the result does not seem to be the best how can I put it in the foreground? Link to comment Share on other sites More sharing options...
fastwebdev Posted October 19, 2015 Share Posted October 19, 2015 Great tutorial, is working, but depends your div header to mine is that in global.js $(window).scroll(function(){ if ($(this).scrollTop() > 150) { $('#header').addClass('fixed'); } else { $('#header').removeClass('fixed'); } }); this chunk in global.css .fixed {position:fixed!important;z-index:9999;width:100%;margin:0px;top:0px;} Link to comment Share on other sites More sharing options...
lunohod.com.ua Posted May 12, 2016 Share Posted May 12, 2016 (edited) Hi. I used this snippet for "block_top_menu". Works great, but when, while scrolling, "block_top_menu" become "fixed" it changes width on 1263px (from 1170px). How to fix this issue? Edited May 12, 2016 by lunohod.com.ua (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 12, 2016 Share Posted May 12, 2016 Hi. I used this snippet for "block_top_menu". Works great, but when, while scrolling, "block_top_menu" become "fixed" it changes width on 1263px (from 1170px). How to fix this issue? any chance to inspect it directly on your website, please? Link to comment Share on other sites More sharing options...
lunohod.com.ua Posted May 13, 2016 Share Posted May 13, 2016 Thanks for your reply. http://xn--80adffzugu.xn--j1amh/ I temporarily fixed that issue by changing "width" parameter from 100% to 1170px, but it of course affected mobile version (and other screen resolutions). Link to comment Share on other sites More sharing options...
lunohod.com.ua Posted May 13, 2016 Share Posted May 13, 2016 Resolved! I used in superfish-modified.css, restriction of width after definition of width : width: 100%; max-width: 1170px; Link to comment Share on other sites More sharing options...
innocence Posted October 18, 2019 Share Posted October 18, 2019 On 3/17/2015 at 5:15 PM, vekia said: use this js snippet: $(window).scroll(function(){ if ($(this).scrollTop() > 135) { $('#pts-mainnav').addClass('fixed'); } else { $('#pts-mainnav').removeClass('fixed'); } }); and in css styles define class "fixed" .fixed { position:fixed!important; z-index:9999; width:100%; margin:0px; top:0px; } it will work in that way then: thank you for this solution when you are using classic theme modify theme.js and theme.css Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now