Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

how fix topbar in snow flat theme

+3 votes
198 views
asked Jun 20, 2016 in Themes by smohamadi
Hi

Can you help me

i want to fix topbar

when i add position:fixed; in CSS is bad Working
Q2A version: 1.7.4

2 Answers

+3 votes
answered Jun 20, 2016 by Scott

Assuming you're talking about the SnowFlat theme, what you'd need to do is add a margin to the qa-body-wrapper class. I think this should work:

#qam-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 0;
}
.qa-body-wrapper {
    margin-top: 100px;
}

+2 votes
answered Aug 24 by Nabiswake
edited Aug 25 by Nabiswake

Here is how to solve the problem>> Fixed Topbar

This is how to have fixed Topbar navigation bar  in Q2A version: 1.7.5

Add the following in  qa-theme/SnowFlat/qa-styles.css

#qam-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 0;
}
.qa-body-wrapper {
    margin-top: 100px;
}

Then edit qa-theme/SnowFlat/qa-theme.php Line 44

private $fixed_topbar = true;

See example website here

...