Vb3 header code problem...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan McBain
    Senior Member
    • Feb 2002
    • 557

    Vb3 header code problem...

    Ok so I finally have everything working with vb3. A lot of things are different including the code for the header. My header is uneven. Im trying to get my banner on top and centered and have the buttons underneath centered as well? I know a lot of people have more serious problems so if you guys could help me at your leisure that would be great. Here is my header code

    <!-- logo and buttons -->
    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr valign="bottom">
    <td align="left" style="background-image: url($stylevar[imagesfolder]/menu_background.gif);"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
    <td align="right" style="background-image: url($stylevar[imagesfolder]/menu_background.gif);" nowrap="nowrap">

    <if condition="$bbuserinfo[userid]"><a href="usercp.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_profile.gif" alt="top_profile.gif" title="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0" vspace="8" /></a></if>
    <if condition="$vboptions[allowregistration] and (!$bbuserinfo[userid] or $vboptions[allowmultiregs])"><a href="register.php?$session[sessionurl]do=signup"><img src="$stylevar[imagesfolder]/top_register.gif" alt="top_register.gif" title="Registration is free!" border="0" vspace="8" /></a></if>
    <a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_calendar.gif" alt="top_calendar.gif" title="Calendar" border="0" vspace="8" /></a>
    <a href="memberlist.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_members.gif" alt="top_members.gif" title="Find other members" border="0" vspace="8" /></a>
    <a href="faq.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_faq.gif" alt="top_faq.gif" title="Frequently Asked Questions" border="0" vspace="8" /></a>
    <a href="search.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_search.gif" alt="top_search.gif" title="Search" border="0" vspace="8" /></a>
    <a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_home.gif" alt="top_home.gif" title="Home" border="0" vspace="8" /></a>
    &nbsp; &nbsp;

    </td>
    </tr>
    </table>
    <!-- /logo and buttons -->
    <!-- content table -->
    <table width="$stylevar[outertablewidth]" cellpadding="$stylevar[spacersize]" cellspacing="0" border="0" align="center" class="page">
    <tr>
    <td>
  • bromyaur
    Senior Member
    • Jan 2002
    • 232
    • 3.6.x

    #2
    here is how I got mine centered on my test forum


    I also removed the menu backgound gif

    the bold parts is what I added

    this centered my logo and buttons, when you say banner do you mean logo? Anyway this should give you an idea of what to do.


    <!-- logo and buttons -->
    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr valign="bottom">
    <td align="center" <a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
    <td align="right" nowrap="nowrap">
    <tr>
    <td valign="top">
    <p align="center">

    <if condition="$bbuserinfo[userid]"><a href="usercp.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_profile.gif" alt="top_profile.gif" title="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0" vspace="8" /></a></if>
    <if condition="$vboptions[allowregistration] and (!$bbuserinfo[userid] or $vboptions[allowmultiregs])"><a href="register.php?$session[sessionurl]do=signup"><img src="$stylevar[imagesfolder]/top_register.gif" alt="top_register.gif" title="Registration is free!" border="0" vspace="8" /></a></if>
    <a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_calendar.gif" alt="top_calendar.gif" title="Calendar" border="0" vspace="8" /></a>
    <a href="memberlist.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_members.gif" alt="top_members.gif" title="Find other members" border="0" vspace="8" /></a>
    <a href="faq.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_faq.gif" alt="top_faq.gif" title="Frequently Asked Questions" border="0" vspace="8" /></a>
    <a href="search.php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_search.gif" alt="top_search.gif" title="Search" border="0" vspace="8" /></a>
    <a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[imagesfolder]/top_home.gif" alt="top_home.gif" title="Home" border="0" vspace="8" /></a>
    &nbsp; &nbsp;
    </td>
    </tr>

    </td>
    </tr>
    </table>
    <!-- /logo and buttons -->
    <!-- content table -->
    <table width="$stylevar[outertablewidth]" cellpadding="$stylevar[spacersize]" cellspacing="0" border="0" align="center" class="page">
    <tr>
    <td>

    Comment

    • Ryan McBain
      Senior Member
      • Feb 2002
      • 557

      #3
      thanks, worked like a charm

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 73981

        #4
        Originally posted by bromyaur
        here is how I got mine centered on my test forum


        I also removed the menu backgound gif

        the bold parts is what I added

        this centered my logo and buttons, when you say banner do you mean logo? Anyway this should give you an idea of what to do.
        Here is the header code that I came up with.

        HTML Code:
        <div id="Header">
        <a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a>
        </div>
        <div id="headernav">
        <table width="100%">
          <tr>
            <td align="left">&nbsp;<if condition="$bbuserinfo[userid]"><a href="usercp.php?$session[sessionurl]" class="toplinks"  title="Here you can view your subscribed threads, work with private messages and edit your profile and preferences">Control Panel</a> | </if><if condition="$vboptions[allowregistration] and (!$bbuserinfo[userid] or $vboptions[allowmultiregs])"><a href="register.php?$session[sessionurl]do=signup" class="toplinks"  title="Registration is free!">Join Now!</a> | </if>
              <a href="calendar.php?$session[sessionurl]" class="toplinks" title="Calendar">Events</a> | 
              <a href="memberlist.php?$session[sessionurl]" class="toplinks" title="Find other members">Members</a> | 
              <a href="faq.php?$session[sessionurl]" class="toplinks" title="Get Help with the Community Software">Help Center</a> | 
              <a href="$vboptions[forumhome].php?$session[sessionurl]" class="toplinks" title="Home">Home</a>
            </td>
            <td align="right">
              <form action="search.php" method="post" name="searchbar" class="topform">
                <input class="toplinks" onfocus="this.value='';" onblur="if (this.value=='') {this.value='Search the forums...';}" type="text" name="query" value="Search the forums..." size="26" maxlength="150" />
                <input type="submit" name="submit" value="Go!" class="toplinks" alt="Submit Search" />
                <a href="/search.php" title="Do an Advanced Search">Advanced</a>&nbsp;&nbsp;
                <input type="hidden" name="currentforum" value="" />
                <input type="hidden" name="forumchoice[]" value="0" />
                <input type="hidden" name="titleonly" value="0" />
                <input type="hidden" name="showposts" value="0" />
                <input type="hidden" name="searchdate" value="365" />
                <input type="hidden" name="s" value="" />
                <input type="hidden" name="do" value="process" />
                <input type="hidden" name="booleanand" value="yes" />&nbsp;
              </form>
            </td>
          </tr>
        </table>
        </div>
        <div id="headernav2"></div>
        <div id="Content">

        Here is the CSS that goes with it:
        Code:
        #Header, #Footer {
        	width:740px;
        	margin:0px auto;
        	text-align:center;
        	padding-left:15px;
                padding-right:15px;
        	background-color: transparent;
        }
        
        #Content {
        	width:740px;
        	margin:0px auto;
        	text-align:left;
        	padding:15px;
        	border:1px solid #333;
        	background-color:#fff;
        }
        
        #headernav {
           margin:0px auto;
           background-color: #8080A6;
           color: #fff;
           width:740px;
           padding-left:15px;
           padding-right:15px;
           border-top:1px solid #000;
           border-bottom:1px solid #000;
           font-family: Verdana, sans-serif;
           font-size: x-small;
           font-weight: bold;
        }
        #headernav td {
          font-size: x-small;
        }
        
        #headernav2 {
          margin:0px auto;
          border-top: 1px solid #2F5691;
          background: #2F5691;
          width:740px;
           padding-left:15px;
           padding-right:15px;
          height:4px;
          font-size:2px;
        }
        
        .toplinks {
          font-weight: bold;
          font-size: x-small;
          color: #000000;
        }
        
        a:link.toplinks, a:visited.toplinks {
          color:  #003366;
        }
        
        a:hover.toplinks {
          color:  #FF6600;
        }
        
        .topform {
          padding: 0;
          margin: 0;
        }
        
        
        .topform input {
          font-family: Verdana, sans-serif;
          font-size: x-small;
          padding: 1px;
          border-width: 1px;
        }
        
        .topform a:link, .topform a:visited {
          font-family: Verdana, sans-serif;
          font-size: x-small;
          color: #003366;
          font-weight: bold;
        }
        
        div.spacer {
          margin:0px;
          padding:0px;
          clear: both;
          }
        Hope this helps. If you use it, you will have to change the colors away from the default purple.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

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