Align Tables Left But Keep Forum Centered?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • psoexplorer
    Member
    • Aug 2003
    • 38

    Align Tables Left But Keep Forum Centered?

    Seems simple enough, but I had problems with this in VB2 and it took me hours to sort out - and now in VB3 I cant figure it out at all. I want all the tables to stay to the left of the forum layout when a large image is posted, rather than everything sticking to the center and looking very stupid like in the attached picture.

    I hope someone understands - I've been way too long trying to figure it out and my brain hurts, so I'm sorry if I make no sense.... HELP!!

    A bit of info on the image: the pic on the left is how it looks currently when a large image is posted - of course the cell for the post with the image in stretches out and the rest of the tables center above and below it (look at the unsightly gap in the layout where the red squiggle is) - but i want them to align left, so the whole left side of the forum is flush. Not flush to the left side of the page though - the whole thing still needs to be centered on the page. It needs to be like the image on the right, the red line shows what i mean.
    Attached Files
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Go to your:

    Admin CP -> Styles & Templates -> Style Manager -> Common Templates (in the menu)

    For your header template, remove the red code and add the green code:

    Code:
    <!-- logo -->
    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr>
    	<td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
    	<td align="$stylevar[right]">
    		&nbsp;
    <!--
      NEW HEADER &amp; NAVBAR
      
      Now that the nav buttons are in the
      navbar template, you can stick whatever
      you like into this space.
    
      This makes it much easier for novice
      admins to customize their header
      template without affecting important
      navigation elements.
    -->
    	</td>
    </tr>
    [color=red]</table>[/color]
    <!-- /logo -->
    
    [color=green]<tr>
    <td align="left" valign="top" colspan="2">[/color]
    
    <!-- content table -->
    $spacer_open
    
    $_phpinclude_output
    For your footer template, add the green code near the top:

    Code:
    <br />
    <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
    <br />
    
    $spacer_close
    <!-- /content area table -->
    
    [color=green]</td>
    </tr>
    </table>[/color]
    
    <form action="$vboptions[forumhome].php" method="get">
    	
    <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
    <tr>
    Then go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> spacer_open

    Make the changes shown in red:

    Code:
    <!-- open content container -->
    <if condition="$show['old_explorer']">
    	<table cellpadding="0" cellspacing="0" border="0" width="$stylevar[outertablewidth]" align="[color=red]left[/color]"><tr><td class="page" style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">
    <else />
    	<div align="[color=red]left[/color]">
    		<div class="page" style="width:$stylevar[outerdivwidth]; text-align:$stylevar[left]">
    			<div style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">
    </if>
    I tested this and it seems to work.

    Comment

    • psoexplorer
      Member
      • Aug 2003
      • 38

      #3
      Thanks, it worked a treat! The only thing that still doesnt align to the left though is the footer menu... but I think I can sort that out myself.

      Thanks again!
      Last edited by psoexplorer; Wed 26 May '04, 10:40pm.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...