Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Trepidation on March 21, 2010, 09:59:59 AM

Title: How Do I Centre My Banner For My Website?
Post by: Trepidation on March 21, 2010, 09:59:59 AM
I'm not 100% sure as to what SMF version I have, if it helps... This is my default theme's name...
"SMF Default Theme - Curve (2.0 RC3)"

I will pm anyone who is willing to help me the link to my website, as I for some reason am not allowed to post external links.

I'd really appreciate it if someone could give me a hand with this, as I am very VERY new to Simple Machines.

Thanks,
Trep.

http : // merch . timer 150 . com / index . php
(That is the website, just testing something here to see if you guys can see it, take out the spaces to view it.)
Title: Re: How Do I Centre My Banner For My Website?
Post by: Chas Large on March 21, 2010, 10:17:51 AM
Hello Trepidation.

Well with a bit of fiddling I can see your site. You are indeed running SMF 2.0 RC3.

I see you've modified the template to get the banner up there but you've got some extra code showing there too.

You've hard coded the banner so probably just adding a <div> pair will align it for you, like this.

However if you didn't hard code it then we'll need to think again. ;)

Strike all that, just realised you added your banner as the logo. Sorry.
Now to centre that we need to change a CSS setting. Gimme a few minutes.
Title: Re: How Do I Centre My Banner For My Website?
Post by: Trepidation on March 21, 2010, 10:25:44 AM
I feel like somewhat of an idiot, but where can I go to edit the code and paste what you've just provided? I'm the one who designed the banner, but I wasn't the one who put it up... Like I said I am very VERY new to simple machines. Thanks for the help though!
Title: Re: How Do I Centre My Banner For My Website?
Post by: Road Rash Jr. on March 21, 2010, 10:37:40 AM
Couldn't he just do this? Or is it more complicated than that?
<center>http://img151.imageshack.us/img151/4092/4moolabanner.png</center>

Just tried it and it didn't work
Title: Re: How Do I Centre My Banner For My Website?
Post by: Trepidation on March 21, 2010, 10:40:04 AM
It's a LITTLE more complicated with that, I wish it was that easy, lol.
Title: Re: How Do I Centre My Banner For My Website?
Post by: Road Rash Jr. on March 21, 2010, 10:42:13 AM
Quote from: Trepidation on March 21, 2010, 10:40:04 AM
It's a LITTLE more complicated with that, I wish it was that easy, lol.

As I'm learning this stuff too that's what I'm finding, nothing is easy LOL
Title: Re: How Do I Centre My Banner For My Website?
Post by: Trepidation on March 21, 2010, 10:44:17 AM
Yeah, everything seems a little TOO sophisticated these days with forums and whatnot. I don't know why it's such a big secret to be able to center a banner for a forum, seems too secretive to me.
Title: Re: How Do I Centre My Banner For My Website?
Post by: Chas Large on March 21, 2010, 12:24:10 PM
Sorry guys, I got ahead of myself and posted some rubbish before really checking what I thought would work. Anyway, here goes.

In your Current Theme settings, remove the link to the logo like you have at the moment. Replace it with a backslash.

Now in Themes > Default

Find and open (download to your computer for editing) index.template.php Open it in some plain text editor (Notepad for Windows will do, don't use a word processor!).

In that file find the following code.

<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<div id="header"><div class="frame">
<div id="top_section">
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';

// the upshrink image, right-floated


change it by adding this line into the middle:

<div align="center"><a href="http://merch.timer150.com/index.php?PHPSESSID=07770ce9f185b24059f597796ab452c5&amp;"><img src="http://img151.imageshack.us/img151/4092/4moolabanner.png" alt="4Moola Official Runescape Merchanting Forums" /></a></div>


So it looks like this.

<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<div id="header"><div class="frame">
<div id="top_section">

<div align="center"><a href="http://merch.timer150.com/index.php?PHPSESSID=07770ce9f185b24059f597796ab452c5&amp;"><img src="http://img151.imageshack.us/img151/4092/4moolabanner.png" alt="4Moola Official Runescape Merchanting Forums" /></a></div>

<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';

// the upshrink image, right-floated


Save and upload the file back to the server, do a Refresh CTRL + F5 and your banner is now permanent and centred.
Title: Re: How Do I Centre My Banner For My Website?
Post by: Trepidation on March 21, 2010, 02:04:20 PM
Thank you so much, I really appreciate it. It's been taking me so darn long to try to make this thing work, and it finally does! Greatly appreciated.
Title: Re: How Do I Centre My Banner For My Website?
Post by: Scarecrow7170 on April 21, 2010, 06:11:00 PM
Nice... Just fixed my issue with a bit of editing.. thanks for a great solution  :D

Scarecrow
Title: Re: How Do I Centre My Banner For My Website?
Post by: GIJANE666 on December 16, 2011, 08:59:42 AM
This worked perfectly for me. Awesome thanks :)