Its easy You need to use jQuery :-), I used these features in many themes (You can see my work in themeforest).
Here is the simple code, just replace ".top-nav" with your own css class:
var menuOffset = jQuery('.top-nav')[0].offsetTop; // replace #menu with the id or class of the target navigation jQuery(document).bind('ready scroll',function(){ var docScroll = jQuery(document).scrollTop(); console.log(docScroll); console.log(menuOffset); if(docScroll >= 155){ jQuery('.top-nav').addClass('fixed'); } else { jQuery('.top-nav').removeClass('fixed'); } });
Just change css:
#qa-login-bar { poisition: fixed; top: 0; z-index: 99999}
.qa-body-wrapper { margin-top: 30px }
Replace these CSS to style.css in snow (ou your theme) theme folder (I assumed that you know the theme folder),
#qa-login-bar { background: none repeat scroll 0 0 #8CBF26; border-bottom: 1px solid #7DB018; box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15); height: 30px; margin-bottom: 0; margin-left: 0; margin-right: 0; position: fixed; top: 0; width: 100%; z-index: 999; } .qa-body-wrapper { margin: 35px auto 2%; text-align: left; width: 1000px; } .qa-nav-user { color: #FFFFFF; float: left; font-size: 12px; margin: 5px 0 4px; white-space: nowrap; } Add this, #qa-login-group a { color: #FFFFFF !important; } #qa-login-group a:hover { color: #FFFFFF !important; text-shadow: 1px 1px #AAAAAA; }
#qa-login-group a { color: #FFFFFF !important; } #qa-login-group a:hover { color: #FFFFFF !important; text-shadow: 1px 1px #AAAAAA; }
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.