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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2007, 07:44 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Different width for Navbar and page content

Hi,

I've been fooling around with the templates, but I can't seem to figure out how to keep the banner and navbar at a fixed width of 800px, while adding a 15-20px margin on each side of the rest of the page.

No matter what I've tried, the navbar stays the same width as the forums (about 760px) instead of staying fixed at 800px even when I force the width to 800px in the template.

The default theme here at vb.org is exactly what I'm talking about, for anyone not using the default theme I'll attach a screenshot.

This is a seemingly simple task, at least compared to the other modifications I've made to my forum, but I still can't figure this one out.

Thanks for your help

Edit: Well, after trying again.. (I've learned alot more HTML & CSS since the first time I tried) I added:

Code:
style="position:relative;right:20px;"
in two different places in the navbar template, because increasing the "Spacer Size" to 20px caused the Navbar to jut off the right edge of the forums by 20px.

If there's an easier, non-positioning method to do this please, please let me know.

Thank you!
Attached Images
File Type: jpg diff_width.jpg (7.1 KB, 0 views)
Reply With Quote
  #2  
Old 02-07-2007, 02:13 PM
Staxed's Avatar
Staxed Staxed is offline
 
Join Date: Jun 2006
Location: Fayetteville, NC
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can't check right now while i'm at work (can't get to my test forum behind the firewall)...but I recall i've done it before a simpler way...i'll check when i get home.

what are the two places you put that code in though?
Reply With Quote
  #3  
Old 02-07-2007, 04:26 PM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Irisfire View Post
what are the two places you put that code in though?
I had to add the position:relative to 2 different tables, and change the width=100% to width=800.

PHP Code:
<!-- breadcrumbloginpm info -->
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="1" border="0" width="800" align="center" style="position:relative;right:10px;"
and

PHP Code:
<!-- nav buttons bar -->
<
div align="center">
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="800" align="center" style="border-top-width:0px;position:relative;right:10px;"
It's not that bad or anything, I just don't like using position:relative on a table because I'm not sure if it displays properly on all browsers or whatever. I'm also sure there's an easier way than using positioning..

Let me know when you get home, thanks!
Reply With Quote
  #4  
Old 02-08-2007, 03:53 AM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Irisfire,

I'd like to know this as well. Thanks
Reply With Quote
  #5  
Old 02-08-2007, 11:14 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quantnet,

I figured out the easiest way to do it.

Remove from the header template:

PHP Code:
$spacer_open 
---------

In navbar template:

Add
to the last line:

PHP Code:
$spacer_open 


Find:


PHP Code:
<!-- breadcrumbloginpm info -->
<
table...width="100%"
AND
PHP Code:
<!-- nav buttons bar -->
<
div align="center">
    <
table...width="100%"
Change both 100% to the same pixel width as your banner, i.e. "800"

---------

If you use vBadvanced, add
Quote:
spacer_open
to the "Portal Output Global Variables" in the vBa CMPS Default Settings. Do not include the $ for this step.
Reply With Quote
  #6  
Old 02-08-2007, 01:29 PM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TheMilkCarton

Thanks for the guide. Can i see the template where you made this change ?

I'm basically looking for a similar look like vb.org default Blue lagoon with 95% width.

It seems to me you have a fixed width skin while I only have fluid skins.

Is there anything different if i want to add 15px on both side of my fluid skin with a solid color like here ?
Reply With Quote
  #7  
Old 02-08-2007, 05:52 PM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, in that case, use the same % as your header. If your banner is 95% then make the two changes to 95% in the navbar template. Your header is probably 100%, so you won't have to make any changes to the width of navbar.

If you want to add 15px on each side of your forum, just go to Style Manager and in "Sizes and Dimensions" change Main Table Width to the same width as your navbar and header, i.e. 95%, and then change Spacer Size to 15. This would make the forums 30px skinnier than the navbar and header at all times.
Reply With Quote
  #8  
Old 05-29-2008, 12:23 PM
peterle1 peterle1 is offline
 
Join Date: Nov 2004
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
Quantnet,

I figured out the easiest way to do it.

Remove from the header template:

PHP Code:
$spacer_open 
---------

In navbar template:

Add
to the last line:

PHP Code:
$spacer_open 


Find:


PHP Code:
<!-- breadcrumbloginpm info -->
<
table...width="100%"
AND
PHP Code:
<!-- nav buttons bar -->
<
div align="center">
    <
table...width="100%"
Change both 100% to the same pixel width as your banner, i.e. "800"
Could it be that this doesn't work any longer in 3.7?
Reply With Quote
  #9  
Old 05-29-2008, 11:19 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dunno. Anytime I want a full-width navbar, I move the nav buttons bar code from the navbar template to the header template.
Works every time.
Reply With Quote
  #10  
Old 05-31-2008, 08:47 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the footer, which is wider than the navbar. It begins with the following:

Code:
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
The navbar begins:

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

I'm no expert but this looks like the difference. Note the difference between the width specs.
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 12:28 AM.


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.09961 seconds
  • Memory Usage 2,299KB
  • Queries Executed 14 (?)
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
  • (10)bbcode_php
  • (3)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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete