MyBB Community Forums

Full Version: Centered top links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This will center your top links like so:
[attachment=873]

Keep in mind that mine are bolded so it won't look exactly like mine unless you decide to throw in those few <b>s.



Here we go!


Open the template called "toplinks"
Highlight everything



Replace with
<div align="center">
  <table border="0" id="ul" cellspacing="0" cellpadding="0" width="100%" bgcolor="$theme[menubgcolor]" background="YOUR IMAGE HERE">
    <tr align="justify">
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td><a href="$settings[bburl]/member.php?action=login">$lang->toplinks_login</a></td>
<td><a href="$settings[bburl]/member.php?action=register">$lang->toplinks_register</a></td>
<td><a href="$settings[bburl]/memberlist.php">$lang->toplinks_memberlist</a></td>
<td><a href="$settings[bburl]/search.php">$lang->toplinks_search</a></td>
<td><a href="$settings[bburl]/misc.php?action=help">$lang->toplinks_help</a></td>
<td><a href="$settings[bburl]/calendar.php">$lang->toplinks_calendar</a></td>
<td><a href="$settings[bburl]/index.php">$lang->toplinks_home</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    </tr>
  </table>
</div>

NOTE: (in the above replacement, note the "YOUR IMAGE HERE." This is where your background image goes. Perhaps I'm stupid, but I couldn't manage to pull it off without hardcoding it. If anyone can help me out, thanks. Smile


Close "toplinks"
------------------------------------------------------


Open the template "toplinks_admin"

Highlight everything


Replace it with
<div align="center">
  <table border="0" id="ul" cellspacing="0" cellpadding="0" width="100%" bgcolor="$theme[menubgcolor]" background="YOUR IMAGE HERE">
    <tr align="justify">
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td><a href="$settings[bburl]/member.php?action=logout" onclick="return log_out()">$lang->toplinks_logout</a></td>
<td><a href="$settings[bburl]/usercp.php">$lang->toplinks_usercp</a></td>
<td><a href="$settings[bburl]/admin/">$lang->toplinks_admincp</a></td>
<td><a href="$settings[bburl]/memberlist.php">$lang->toplinks_memberlist</a></td>
<td><a href="$settings[bburl]/search.php">$lang->toplinks_search</a></td>
<td><a href="$settings[bburl]/misc.php?action=help">$lang->toplinks_help</a></td>
<td><a href="$settings[bburl]/calendar.php">$lang->toplinks_calendar</a></td>
<td><a href="$settings[bburl]/index.php">$lang->toplinks_home</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    </tr>
  </table>
</div>

NOTE: (in the above replacement, note the "YOUR IMAGE HERE." This is where your background image goes.

Close "toplinks_admin"
------------------------------------------------------

Open the template called "toplinks_member"

Highlight everything


Replace it with
<div align="center">
  <table border="0" id="ul" cellspacing="0" cellpadding="0" width="100%" bgcolor="$theme[menubgcolor]" background="YOUR IMAGE HERE">
    <tr align="justify">
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td><a href="$settings[bburl]/member.php?action=logout" onclick="return log_out()">$lang->toplinks_logout</a></td>
<td><a href="$settings[bburl]/usercp.php">$lang->toplinks_usercp</a></td>
<td><a href="$settings[bburl]/memberlist.php">$lang->toplinks_memberlist</a></td>
<td><a href="$settings[bburl]/search.php">$lang->toplinks_search</a></td>
<td><a href="$settings[bburl]/misc.php?action=help">$lang->toplinks_help</a></td>
<td><a href="$settings[bburl]/calendar.php">$lang->toplinks_calendar</a></td>
<td><a href="$settings[bburl]/index.php">$lang->toplinks_home</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    </tr>
  </table>
</div>

NOTE: (in the above replacement, note the "YOUR IMAGE HERE." This is where your background image goes.

Close "toplinks_member"






And you're finished! Cool
background="YOUR IMAGE HERE"
into
style="background:url(YOUR IMAGE HERE);"
Probably works better throughout browsers.
Thanks for the input. Smile