Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.2k views
in Themes by
How can I make the header area sticky in the Snowflat theme?

1 Answer

+4 votes
by

Try putting something like this in your stylesheet:

#qam-topbar {
  position: sticky;
  top: 0;
  z-index: 1;
}

z-index puts the navigation bar before other elements.

by
It is very useful
I have use it on my theme
by
I used the sample page, it worked thanks a lot: https://tvtavsiye.com/soru-cevap
by
Works like a charm
by
Can you tell me how to do this, I'm not an expert, which file should I add and how?
by
You need not be an expert, but you do need a general understanding of cascading stylesheets (CSS) and how to use a text editor. The snippet goes into the stylesheet of your theme (usually ${Q2A_INSTALL_DIR}/qa-theme/SnowFlat/qa-styles.css). If you're using a different theme than SnowFlat replace the name with that theme's name. But in that case you may also need to adjust the CSS class name.
by
unfortunately i couldn't :(
by
+1
Couldn't what?
by
I added the code where you said, but unfortunately it didn't work, my domain name is problemli.com
by
+1
The code snippet clearly is not on your live system (https://www.problemli.com/qa-theme/SnowFlat/qa-styles.css). I'm not going to speculate why the change didn't show up there, since I know nothing about your workflow.
by
I have removed it because it is not there, my question is which code I will add in order not to spoil the site, I would appreciate it if you inform me about it.
sorry i'm just learning :)
by
The stylesheet already has a setting for the ID #qam-topbar (in line 375). Add the settings there. If you're still unsure of how to do that: please find a CSS tutorial first. This is not the right place for teaching you CSS basics.
by
it's done now, thank you very much, you helped me patiently :)
...