I’m trying to change the navbar in my child theme but I’m a newbie. I read some questions here about that and even saw the bootstrap site, but I don’t understand how to solve my problem. I’m sorry for my ignorance but could someone explain to me how it works?
I’m using this theme http://demos.codexcoder.com/#limo_wp and I would like to fixed the navbar instead of this “blink” and float. Just stay fixed after scroll the page.
You can find an example on the bootstrap website.
http://getbootstrap.com/examples/navbar-fixed-top/
Or you can change
to
in your header file and remove:
from custom.js
The following command:
Fixed to top:
Add
.navbar-fixed-top
and include a.container
or.container-fluid
to center and pad navbar content.If you want to fixed menu after scroll the page. You use fllowing javascript code. In this code fixed menu after if scrolls over a specific element. I wrote the following code based on your template.
just add a
class="nav navbar navbar-fixed-top"
I’ll give you an example of my code, just use it and see how it works.
This will generate a navbar with a heading (title)
5 menu items of wich 2 are dropdowns.
Greetings 🙂
You would need to add something like the following CSS to a child theme to override this behavior in the parent theme.
If you aren’t familiar with WordPress child themes, here is a good resource for you. There may even be a theme setting for this. Depends on what the theme developer made available in the theme’s options.
In the
navbar
div
, you should add the class name.navbar-fixed-top
.You could try my css also, simple yet effective if you are positioning it always on the top