MyBB Codes

Full Version: [Tutorial] Centering the logo.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have come across many posts here where users have asked how to center the logo. I have answered some of them and thought it would be best to make a sort of tutorial about it so it can save a lot of time in the future to those that want to accomplish such a thing.

Anyway, here we go:

To center the default logo, find at the Header templates-header the following code:

<div class="logo" ><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>

and replace it with:

<div class="logo" style="margin:0 auto;text-align:center"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
Reference URL's