Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2015, 01:29 AM
XPSuedoX XPSuedoX is offline
 
Join Date: Apr 2013
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to center the Navagation Bar

Hi,

I would like to center my Navigation Bar on my forums as my Nav Tabs are on the left and all that I can do is change that to the right, but no center option in the code.

I have looked all over and found nothing and was hoping someone here may have a snippet of code to add in to the css_additional.css section or help explain to me how to fix this problem.

Here is a site that has the navbar centered ---> http://www.empirisoft.com/support/

Thx
Reply With Quote
  #2  
Old 01-15-2015, 12:52 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I looked at doing this and anything I tried broke the responsive design, but then again, I'm no expert.
Reply With Quote
  #3  
Old 01-15-2015, 07:52 PM
XPSuedoX XPSuedoX is offline
 
Join Date: Apr 2013
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
I looked at doing this and anything I tried broke the responsive design, but then again, I'm no expert.

Yeah, I've spent 3 days on trying things now to no avail.

What I have noticed is that the Navbar is also linked to the top main bar that has all your admincp and messages, edit site etc.. So I don't know if that's one of the reasons for this being so difficult to achieve.

Hopefully some one will come along with some advice sooon

Thx for your input though.
Reply With Quote
  #4  
Old 01-15-2015, 09:54 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't have vB 5 but I looked at the site posted and it has

Code:
.navtabs {
            text-align: center;
}
in additional.css. See what that does.

You may need this too;

Code:
.navtabs li {
                display: inline-block;
                float: none;
}

EDIT: I'm at a disadvantage here because I don't use vB 5 so I'm doing a little guessing here. If the above CSS messes up something else try the same css but for navbar and navbar li

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

That's not a vB 5 site, it's vB 4.2.1!

I found a vB 5 site and I think this works:

Code:
#channel-tabbar {
     text-align: center;
}

.h-left {
     float: none;
}

#channel-tabbar ul li {
     display: inline-block;
     float: none;
}
Reply With Quote
  #5  
Old 01-16-2015, 02:38 AM
XPSuedoX XPSuedoX is offline
 
Join Date: Apr 2013
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Nerbert

I Really appreciate the time you took to post your idea's and also the fact that they worked

the code at the bottom of your post was the correct one to be used. There will be some fine tuning to be done just margin stuff but it worked without messing with any other layout's or widgets - So far any way

Thanks heaps guys ----------- Legends.
Reply With Quote
  #6  
Old 01-16-2015, 02:49 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it worked
Reply With Quote
  #7  
Old 01-16-2015, 12:45 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That code works until you resize the browser window. After the resize down then up, the menu items are stacked vertically. Same issue I was having when I tried.
Reply With Quote
  #8  
Old 01-16-2015, 01:28 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm afraid I'm lost on what to do about that. When I set float to "none" I also had to set display to "inline-block" to keep the tabs inline instead of vertical.

If I had vB 5 maybe I could figure this out but I have no plans to upgrade unless vBulletin puts hooks back in the code.

There are enough good coders here that I think someone could figure this out. Sorry I couldn't get it working right.
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 04:08 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
  • Page Generation 0.04084 seconds
  • Memory Usage 2,230KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete