![]() |
Sticky Top Bar
1 Attachment(s)
I have used the idea and some code from XiTCLUB
This can work in a more simple way and act in the general navbar too. Template Navbar ************* as line number 2 paste <div id="stickyBar"> additional.css *********** Code:
#stickyBar.stick { Set the height of the Navbar incl submenu (my page Navbar is height:59px;) It is important to add the correct px Template Headinclude ****************** Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> If you use another jquery version is also okay. It is important to add the correct px If you use Google Translate disappear the top of the navbar!! You can see it in action here, but only with this style http://www.corvetteworld.dk/forums/forum.php?styleid=7 |
Is this the same as this:
https://vborg.vbsupport.ru/showthread.php?t=297532 |
No - here is used standard navbar and not a new!
|
It works, awesome.
http://www.gamerperfection.com/forum.php |
Problem - it does not scroll sideways?
i.e. if the browser window is smaller it does not scroll with the page if you move the horizonal bar? |
If you put 171px or so instead of 190px (Headinclude) and your background image in additional.css as the background instead of the dark color it will work better.
Your page will be no less if the browser window is smaller nor!!! |
I'm not sure you understood what I was saying.
If I reduce the width of my browser window so it's less than 1260px (which is the width of the site), then the horizontal scroll bar appears. When I move the horizontal scroll bar the whole site moves with the exception of the sticky navbar. This is also an issue on smart phones if you view the site and zoom in, then when you move the page horizontally everything moves except the sticky navbar. So if the window is smaller in width than the navbar when it becomes a sticky navbar you can't see the end of it and therefore can't see the buttons. |
In additional.css
width:100%; max-width:1260px; |
No, that's no good. What that does is it will wrap the navbar so if the window width is reduced anything on the right side will drop underneath, which is fine, but the menu items that drop underneath can't be clicked.
Try it out on my site yourself: http://www.gamerperfection.com Try it full window, then reduce the window so that the horizontal bar appears and you can see what I mean. I assume the bar doesn't move with the horizontal scroll because the bar is in a fixed position. |
Quote:
|
All times are GMT. The time now is 02:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|