When I try to create floating menu using position: fixed
The menu at the top moves to left and its width is reduced. How to fix it.
Also, what will be the impact of this floating menu when the site will be opened on some mobile or tablet?
Senior Boarder
GK User
Thu Jan 24, 2013 11:09 am
Hi,
First of all - please avoid of usage the position: fixed, because it causes big rendering problems on the mobile devices - it is a very CPU consuming CSS code and it causes flicking and the rendering artifacts.
Administrator
GK User
Wed Feb 06, 2013 10:42 am
Can't it be done via javascript? Mashable doesn't use css code for the fixed menu, it means there is something else from which it can be done.
Senior Boarder
GK User
Wed Feb 06, 2013 1:18 pm
It can be, but you have to write your own script, because this kind of customization is beyond our support. I can only suggest that you have to use absolutely positioned menu and trigger the onScroll event for window to update the menu position.
Administrator
GK User
Mon Mar 04, 2013 12:53 pm
I saw the floating menu in your recent Joomla template. I assume it will come in the upcoming wordpress theme as well. Can I expect the same in this theme's update?
Senior Boarder
GK User
Mon Mar 04, 2013 7:43 pm
Sorry but we have no plans to change the menu in this theme.
Administrator
GK User
Tue Mar 05, 2013 6:40 am
OK. But can you share the particular code for doing it. Since you said that position: fixed causes high cpu load, can you share what did you do in the recent theme to avoid that.
Senior Boarder
GK User
Tue Mar 05, 2013 9:18 am
But the latest template uses position: fixed with one change - the fixed menu will load only on the devices with JavaScript support - so on the older slower devices it won't be displayed as a fixed menu and only as a static menu. The code is available here: http://demo.gavick.com/joomla25/simplic ... scripts.js - remember that it is the MooTools code and WP uses jQuery.