Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Site navbar overlayed on background image Details »»
Site navbar overlayed on background image
Version: 1.00, by silurius silurius is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-25-2006 Last Update: Never Installs: 3
Template Edits
 
No support by the author.

How to overlay a site navigation bar over a background image

I am relatively new to vBulletin, and have observed that most vBulletin systems seem to rely on the vBulletin navigation bar for site navigation, while some introduce an additional site navigation bar and place this well above all of the vBulletin content. In my own case, I had a requirement to place a navbar on top of a background image, as I was working with a designer who had an extremely specific design requirement. My first thought was to use an image map relying on a graphical navbar but this was unsuccessful (you cannot imagemap a background image). After experimentation, I found a way to use DIV to get around this problem. Here are the steps I took.

Please test this out on a test site first

Step 1. Backup your database. Note all of your Main CSS settiings and save a copy of your header template somewhere.

Step 2.
Remove all values for "Background" in CSS
-- Go to admincp -> main css -> delete contents of "background" fields

Step 3. Enter the following into "Background" for main css -> body
-- "#000000 url(images/misc/bkg_image.jpg); background-repeat: no-repeat;
-- (this assumes a black background and a no-repeat requirement for your image)

Step 4. Determine the placement of your new site navbar
-- This will be determined by your design specifications. It is recommended to temporarily include an image-based navbar in your background image first, calculate the exact pixel requirements for "Top", "Left", "Height" and "Width". You can remove the navbar layer from the background image once you have the links all lined up correctly.

Step 5. Add DIV code to header template
-- Go to admincp -> templates -> header and add the following code:

(be sure to replace the portions in green with your own requirements)

Code:
<!-- DIV NAVBAR -->
<div
   style="
    font-size: 12px;
   top: 133px;
   left: 590px;
   width: 33px;
   height: 17px;
   position: absolute;
   z-index: 4; 
   visibility: visible;">
<a href="../linkone.html"><font color="#FFFFFF">site link one</font></a>
</div>
<div
   style="
    font-size: 12px;
   top: 133px;
   left: 638px;
   width: 40px;
   height: 17;
   position: absolute;
   z-index: 4; 
   visibility: visible;">
<a href="../linktwo.html"><font color="#FFFFFF">site link two</font></a>
</div>
<div
   style="
    font-size: 12px;
   top: 133px; 
   left: 692px; 
   width: 33pxpx;
   height: 17px;
   position: absolute;
   z-index: 3; 
   visibility: visible;">
<a href="../linkthree.html"><font color="#FFFFFF">site link three</font></a>
</div>
<div
   style="
    font-size: 12px;
   top: 133px; 
   left: 762px;
   width: 33px;
   height: 17px;
   position: absolute;
   z-index: 2; 
   visibility: visible;">
<a href="../linkfour.html"><font color="#FFA442">site link four</font></a>
</div>
<div
   style="
    font-size: 12px;
   top: 133px; 
   left: 812px;
   width: 33px;
   height: 17px;
   position: absolute;
   z-index: 1; 
   visibility: visible;">
<a href="../linkfive.html"><font color="#FFFFFF">site link five</font></a>
</div>
<!--/DIV NAVBAR -->
Step 6. Test your links placement (remember the areas in green, above). If they are not lining up with your specification, tweak the pixel values in each DIV above in the header template.

Step 7. If there is still an image-based navbar layer, edit the background image and remove the navbar layer you were using as a guide.

That should be it!

Optional Steps:

Here is something to consider if your design specs are extremely picky about bkgd-image/forum interaction.

In my own situation, my designer had never designed for vBulletin before, and neither of us were aware at first of some of the basic technical limitations. During development, it dawned on me that to put it simply, not all background images are easy/possible to integrate well with vBulletin.

Test out my link under Internet Explorer, and you will find that when you drag the right-hand edge of the browser window from right to left, the forum content will move to overlap with the image. At this time, I do not know of a way to get around this due to IE's limitations. However, it is possible to introduce a CSS element in Main CSS -> Body to lock that left-hand margin space down for Firefox/Opera browsers:

Code:
min-width: 1100px;
There may be other tricks, too of which I am not yet aware. Please post here and PM me if you find a better solution, and best of luck to you!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-26-2006, 07:30 PM
Omranic's Avatar
Omranic Omranic is offline
 
Join Date: Jan 2005
Location: Egypt
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really Great Powerfull Designing Tool & Method
I'll Take it Up in my upcoming Designs

Thaks alot
Reply With Quote
  #3  
Old 01-26-2006, 07:44 PM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the feedback. One addendum: you'll notice a "z-index" value inside the DIV in the example above. It is probably unnecessary, and harmless unless you're doing a lot of complicated overlaying.
Reply With Quote
  #4  
Old 01-26-2006, 09:37 PM
SHANE-D-PAIN's Avatar
SHANE-D-PAIN SHANE-D-PAIN is offline
 
Join Date: Sep 2003
Location: Sheffield, Uk
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a Demo in existance?

Might help for some poeple.
Reply With Quote
  #5  
Old 01-26-2006, 09:39 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. Works great!
Reply With Quote
  #6  
Old 01-26-2006, 09:44 PM
Sooner95 Sooner95 is offline
 
Join Date: Apr 2003
Location: I don't know
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got a site we could visit, to get a better idea? thx
Reply With Quote
  #7  
Old 01-26-2006, 10:00 PM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My changes are actually not live just yet because I have additional design requirements which are still stumping me.

But I hope to push everything out pretty soon. I'll drop a link in right away when that happens!
Reply With Quote
  #8  
Old 01-27-2006, 12:06 AM
DeMiNe0 DeMiNe0 is offline
 
Join Date: Jun 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo or screen shot please.
Reply With Quote
  #9  
Old 01-27-2006, 01:20 AM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any screenshots of this working?
Reply With Quote
  #10  
Old 01-27-2006, 03:46 AM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope to drop a link/screenshot in the next week. I have another design requirement and a font color issue that are still stumping me.
Reply With Quote
Reply

Thread Tools

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:59 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.07433 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete