MyBB Community Forums

Full Version: Home page menu tab button HELP PLEASE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Smile

It's Shane here, I just need a little help with something.

I'm trying to add tabs on the home page menu of website: MyBB.

When I try to add it in the header template, it goes off the edge and down and it glitches real bad.
Here's the code:

<div id="container">
		<a name="top" id="top"></a>
		<div id="header">
			<div id="logo">
				<div class="wrapper">
					<a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
				</div>
			</div>
			<div id="panel">
				<div class="upper"><!-- This div(class="upper") is closed in the header_welcomeblock_member and header_welcomeblock_guest templates -->
					<div class="wrapper">
						<ul class="menu top_links">
                                                        <li><a href="http://intense-gaming.net/index/portal.php"><img src="http://intense-gaming.net/house.png" /> Home</a></li>
                                                        <li><a href="http://intense-gaming.net/index/"><img src="http://intense-gaming.net/page_word.png" /> Forum</a></li>
                                                        <li><a href="http://intense-gaming.net/index/"><img src="http://intense-gaming.net/donate/heart.png" /> Donate</a></li>
							<li><a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a></li>
							<li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>

						</ul>
						{$welcomeblock}
			</div>
		</div>
		<div id="content">
			<div class="wrapper">
				{$pm_notice}
				{$bannedwarning}
				{$bbclosedwarning}
				{$unreadreports}
				{$pending_joinrequests}
				<navigation>
				<br />

And when I enable it it does, makes this silly error.

[Image: taberror.png]

If you look you can see the tab goes off the edge and underneath, and when i try to remove the
							<li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>
The search will go under as well. Hope you can help!

The Theme I'm using is apartnight by Justin S.

Thanks so much! Big Grin

Shane
The solution to your problem would be to remove the img tags from your new navigation links and use CSS background-image property within a class or a style attribute like this:
                        <ul class="menu top_links">
                            <li><a href="http://intense-gaming.net/index/portal.php" style="background-image: url('http://intense-gaming.net/house.png');">Home</a></li>
                            <li><a href="http://intense-gaming.net/index/" style="background-image: url('http://intense-gaming.net/page_word.png');">Forum</a></li>
                            <li><a href="http://intense-gaming.net/index/" style="background-image: url('http://intense-gaming.net/donate/heart.png');">Donate</a></li>
                            <li><a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a></li>
                            <li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>
                        </ul>
OMG! Thank you so much bro!! =D

So much appreciated Wink

Thanks again! Smile