News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How Do I Centre My Banner For My Website?

Started by Trepidation, March 21, 2010, 09:59:59 AM

Previous topic - Next topic

Trepidation

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.)

Chas Large

#1
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.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Trepidation

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!

Road Rash Jr.

#3
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
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Trepidation

It's a LITTLE more complicated with that, I wish it was that easy, lol.

Road Rash Jr.

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
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Trepidation

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.

Chas Large

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.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Trepidation

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.

Scarecrow7170

Nice... Just fixed my issue with a bit of editing.. thanks for a great solution  :D

Scarecrow

GIJANE666

This worked perfectly for me. Awesome thanks :)

Advertisement: