News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Center Logo

Started by tennis4you, December 27, 2010, 04:31:55 PM

Previous topic - Next topic

tennis4you

I would like to center the logo at the top of the forum.  What file do I need to edit.  I thought it might be on the index.php but I was wrong  :)

Thanks!

Paul_Pauline

"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you

Interesting.  I searched for "logo-smf.gif" and did not find it.  I guess it is not as simple as I had hoped.  Can you tell me what code to edit to make it centered?  Sorry and thanks!

cicka

Can you please upload that file here?

tennis4you

Here it is.  I grabbed this from the "Themes" - "Default" folder.  I assume that was correct...

cicka

Quote from: tennis4you on December 27, 2010, 04:48:03 PM
Here it is.  I grabbed this from the "Themes" - "Default" folder.  I assume that was correct...

If you are using the default skin then it is ok. Otherwise you must upload here the index.template.php file of the skin that you are using. Now do you want to center the logo that you have entered fom the admin panel or the smf logo? If it is for the first then please see my other post at this thread.

http://www.simplemachines.org/community/index.php?topic=414681.msg2891662#msg2891662

If it is for the second then find this code at the index.css file

.floatright
{
float: right;
}


and change it to this other code

.floatright
{
text-align: center;
}

tennis4you

Well that did a few weird things.  One it pushed the logo to the top color and made a lot of space between the logo the menu below.  Any way to reduce that space?

Also, I had installed a mod earlier that centered the menu below the logo.  That menu is now left justified again. 

It also pushed the white arrow that collapses the top down.

Any thoughts?

Here is the forum:  tennis4you.com/forum

Thanks!

cicka

Quote from: tennis4you on December 27, 2010, 05:08:57 PM
Well that did a few weird things.  One it pushed the logo to the top color and made a lot of space between the logo the menu below.  Any way to reduce that space?

Also, I had installed a mod earlier that centered the menu below the logo.  That menu is now left justified again. 

It also pushed the white arrow that collapses the top down.

Any thoughts?

Here is the forum:  tennis4you.com/forum

Thanks!

I think the problem might be at the logo image that is bigger than the smf logo. Some extra edits are required but unfortunately I do not have much free time now to look into that.

The other mod, can you check the code and see if it conflicts with the edits I posted above?

tennis4you

Yikes, not sure how to do that.  :)

Paul_Pauline

That logo would look far better if it had a transparent background like this  http://www.uk-exhibitionist.net/index.php
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you

Yeah, the guy who made the logo is going to send me one with a transparent background.  I am just waiting for that and trying to figure out the centering for the time being.  :)

tennis4you

How did you get your logo into the lower color?  Mine seems to straddle the color and messed with other stuff on the forum.  Yours is perfect.

Paul_Pauline

Here's the section of code from the index.template.php file on the test site I linked you to, that placed that code there.

You would obviously need to tailor it with your own details.

// the upshrink image, right-floated
echo '

<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
echo '
', !empty($settings['site_slogan']) ? '<div id="siteslogan" class="align_right">' . $settings['site_slogan'] . '</div>' : '', '
</div>
<div class="centertext">
        <a href="http://amateurflashers.co.uk/">
        <center><img style="margin-bottom:12px" border="0" src="http://uk-exhibitionist.net/Themes/default/images/banner.jpg" width="68%"  alt="uk-exhibitionist.net" title="uk-exhibitionist.net" /></a></center>
        </div>
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="user">'; 
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you

Hmmm, tailoring code is not my strong suit.  Would I just need to tailor the image size?

Paul_Pauline

It may look OK if you play with the width="68%" setting, that will change the size of the logo.
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you

LOL, I am in for some problems but I will toy with it.  I never mess with code other than copy paste.  :)

Paul_Pauline

That is actually some extra code that was added to place the logo image there.

It is not the original logo location, that has been removed.
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you

When you say place it "there", where is "there"?  The center or somewhere else?  I assume I have to find some code that is similar to what you attached and replace it and then modify?

Paul_Pauline

Give me a little while to play about with your file !
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

tennis4you


Advertisement: