Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2013, 01:46 PM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Floating Navbar

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

Cheers..
Reply With Quote
  #2  
Old 10-14-2013, 05:56 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DemOnstar View Post
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
Reply With Quote
Благодарность от:
DemOnstar
  #3  
Old 10-14-2013, 06:16 PM
futureaudio futureaudio is offline
 
Join Date: Mar 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
2 благодарности(ей) от:
DemOnstar, JayJay
  #4  
Old 10-15-2013, 03:12 AM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ikopylov View Post
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 View Post
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.
Reply With Quote
  #5  
Old 10-15-2013, 01:19 PM
JayJay JayJay is offline
 
Join Date: Jan 2005
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 10-15-2013, 02:23 PM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #7  
Old 10-15-2013, 07:39 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by futureaudio View Post
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
Reply With Quote
Благодарность от:
DemOnstar
  #8  
Old 10-15-2013, 08:43 PM
futureaudio futureaudio is offline
 
Join Date: Mar 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 View Post
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...
Reply With Quote
Благодарность от:
DemOnstar
  #9  
Old 10-16-2013, 08:40 AM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 View Post
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..
Reply With Quote
  #10  
Old 10-19-2013, 04:49 AM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10373 seconds
  • Memory Usage 2,277KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (5)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete