MyBB Community Forums

Full Version: Custom toplink image/text padding
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I've been messing around for hours trying different guides all over the web. I've tried adding the entry to global.lang etc. I can't seem to get my custom toplink images or text to space out like the default toplinks.

If you look at the "Main Site" link on the live webpage you'll see what I mean.

www.therustyspittoon.com/forums

Here is my code in the header template (I just created a theme through the ACP, I'm just building off the default template.)

global.lang.php
$l['toplinks_mainsite'] = "Main Site";

header template
<!-- custom container -->
<div id="custom-container">
<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>
<ul class="menu top_links">
<a href="http://therustyspittoon.com" target=""><img src="images/Rusted/main.png" alt="" title="" />{$lang->toplinks_mainsite}</a >
{$menu_memberlist}
{$menu_search}

</ul>
</div>
</div>

Am I going about this the wrong way?

In advanced, thanks.
for adjusting that main site link image you can add style property like below in the global.css of the theme
img[src*="main.png"] {margin: -2px 4px;}

global.css should be edited through forum admin panel in advanced edit mode
remember to hard refresh browser (eg. CTRL + F5) on forum index page after saving changes to the style sheet
(08-23-2015, 04:18 AM).m. Wrote: [ -> ]for adjusting that main site link image you can add  style property like below in the global.css of the theme
img[src*="main.png"] {margin: -2px 4px;}

global.css should be edited through forum admin panel in advanced edit mode
remember to hard refresh browser (eg. CTRL + F5) on forum index page after saving changes to the style sheet

I just paste that anywhere in global.css?
^ you can put such code at the bottom of global.css (in advanced mode)
(08-23-2015, 04:41 AM).m. Wrote: [ -> ]^ you can put such code at the bottom of global.css (in advanced mode)

That worked wonders, thank you!