MyBB Community Forums

Full Version: Centering Menu Links?..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having some wierd problem centering links, this is normally really easy but I'm having a problem with it on my new theme, I've tried it on my global.css and my header templates and it aint worked so I'll paste my header template here: and here is the url to my forum www.ultimategamingforums.co.uk

Header Template:
<div id="header">
			<div class="logo"><center><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></center></div>
			
<div id='cssmenu'><center>
<ul>
   <li><a href='{$mybb->settings['bburl']}'><span>Home</span></a></li>
   <li><a href='{$mybb->settings['bburl']}/helpcenter.php'<<span>Help Center</span></a></li>
   <li><a href='{$mybb->settings['bburl']}/memberlist.php'><span>Members</span></a></li>
<li><a href='{$mybb->settings['bburl']}/search.php'><span>Search</span></a></li>
<li><a href='{$mybb->settings['bburl']}/newpoints.php'><span>Store</span></a></li>
</ul></center>
</div>


			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>	


<div id="container">
		<a name="top" id="top"></a>
		
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}
			<navigation>
			<br />
{myshoutbox_abcd}
Move the center tag out of div:

<center><div id='cssmenu'><ul> ...</ul></div></center>

Or try adding this in global.css:

#cssmenu { margin: auto auto; }
Non of them worked bro any other suggestion?
OK.

Open your menu.css, add at the very beginning:

#cssmenu {
text-align:center;
}


Now modify the existings : add the bold texts, remove the strike out texts:

#cssmenu li
{
display:block;
display:inline;
float:left;
margin:0;
padding:0;
}

#cssmenu li a
{
display:block;
display:inline-block;
float:left;
color:#999999;
text-decoration:none;
font-weight:bold;
padding:8px 20px 0 20px;
}

Tested OK:

[Image: oKVhF.png]
Thank you bro!!