vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Floating Navbar (https://vborg.vbsupport.ru/showthread.php?t=303387)

DemOnstar 10-14-2013 01:46 PM

Floating Navbar
 
Is there a floating navbar option/mod for 4.2.x?
If not, then that would be a request...

Cheers..

ikopylov 10-14-2013 05:56 PM

Quote:

Originally Posted by DemOnstar (Post 2453216)
Is there a floating navbar option/mod for 4.2.x?

Example:
Navbar is a "magnet" to the top of the page
see demo http://fotogl.com

futureaudio 10-14-2013 06:16 PM

It could be easily done by adding "position:fixed" to the parent container div. Depending on the style used, it might require a bit of editing and moving things around though.

DemOnstar 10-15-2013 03:12 AM

Quote:

Originally Posted by ikopylov (Post 2453271)
Example:
Navbar is a "magnet" to the top of the page
see demo http://fotogl.com

Yes, that example is exactly what I mean except I would want to include the search in there as well.
Although the design is a little over stylized for me, this is what I am looking for.

Thank you for the example but is there a link to the source?

--------------- Added [DATE]1381810463[/DATE] at [TIME]1381810463[/TIME] ---------------

Quote:

Originally Posted by futureaudio (Post 2453283)
It could be easily done by adding "position:fixed" to the parent container div. Depending on the style used, it might require a bit of editing and moving things around though.

My coding ability is a bit crap but I will have a go at this one using the example above.

Thanks.

JayJay 10-15-2013 01:19 PM

Futureaudio's suggestion is what I would do. What you may find is that the rest of your page may shift up by the width of the navbar so just bear that in mind

DemOnstar 10-15-2013 02:23 PM

Ok, I am on the right lines. I added this to my additional.css

Code:

.navbar {
    position: fixed;
    width: 97.6%;
    z-index: 1;
}

It kinda works in a comical way.. The thing that escapes me is how should it know where the top of the screen is?
Scrolling the page leaves it exactly where it was, but when I scroll to the top of the page, it should stop and then fix itself there...

Good fun so far...:)

ikopylov 10-15-2013 07:39 PM

Quote:

Originally Posted by futureaudio (Post 2453283)
It could be easily done by adding "position:fixed" to the parent container div.

This may apply only if navbar located in absolute top of the page (top=0)


DemOnstar, There is no source. HandMade. Did it myself for my site.
Used 1 script and some css code.
This can be done for each site will be different execution/
Open the contents and copy the code
If you have problems, I will help you.
If it does not take much time

futureaudio 10-15-2013 08:43 PM

You should be able to adjust the vertical placement with "top" attribute. "top: 0" for topmost placement and then add as many pixels to it as need be.
Quote:

Originally Posted by DemOnstar (Post 2453586)
Ok, I am on the right lines. I added this to my additional.css

Code:

.navbar {
    position: fixed;
    width: 97.6%;
    z-index: 1;
}

It kinda works in a comical way.. The thing that escapes me is how should it know where the top of the screen is?
Scrolling the page leaves it exactly where it was, but when I scroll to the top of the page, it should stop and then fix itself there...

Good fun so far...:)


DemOnstar 10-16-2013 08:40 AM

Thank you all for your assistance...
I am getting there bit by bit...

--------------- Added [DATE]1381916601[/DATE] at [TIME]1381916601[/TIME] ---------------

Quote:

Originally Posted by ikopylov (Post 2453675)
This may apply only if navbar located in absolute top of the page (top=0)

Open the contents and copy the code

Not sure which contents you are talking about but you have already helped a great deal by showing me your site...Inspiring..

DemOnstar 10-19-2013 04:49 AM

Same position literally...

The navbar doesn't move, it sits there and everything moves behind it...Ok, now again, it looks a bit weird..It should scroll to the top of the screen and then stop there whilst everything else goes underneath it and away... But alas. it doesn't.. I open the page and all looks as it should, I scroll and the navbar doesn't move but all other content does...

I tried the 'top' attribute and it didn't really do much, I just ended up moving the wrapper down..

What is it apart from coding ability that I am missing?

Thanks...


All times are GMT. The time now is 07:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01331 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete