News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

centre the Logo image URL?

Started by peps1, July 18, 2015, 07:44:58 PM

Previous topic - Next topic

peps1

How do I centre the "Logo image URL:" I put in the Theme Settings > Theme Options and Preferences > Logo image URL:

Kindred

You are going to have to modify the template, since even the CSS relegates the logo to just a certain area
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peps1

Quote from: Kindred on July 18, 2015, 08:07:36 PM
You are going to have to modify the template, since even the CSS relegates the logo to just a certain area

Can you tell me how to do that on the 2.0.10 index.template.php? 

Kindred

not specifically... because the header does not actually deal with centering... There is a left and a right....

you probably should look for a theme that is close to what you want
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

You could ask in that theme's support thread. It couldn't hurt. :)
DO NOT pm me for support!

peps1


Kindred

well, nowhere, until then did you happen to mention that you were using the default/curve theme...

moving to graphics
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peps1

Quote from: Kindred on July 22, 2015, 02:42:34 PM
well, nowhere, until then did you happen to mention that you were using the default/curve theme...

moving to graphics

Didn't know it was relevant, and if anything implied by posting in the 2.0.x section rather them in the theme/graphics boards  :-\

Its not like I would be deliberately scuppering my own request for help.   

Kindred

based on the number of improper, requests we get DAILY in the wrong boards, with missing information or just completely incorrect data -- we can never assume that "just because you posted in 2.0 support, you must be using the default theme"

(in any case, the question is not actually a support question - it is definitely a "how do I change the template question" since it can only be done by changing the template.)

moved now...   maybe someone can help you...   I don't see any easy way to do it, myself...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peps1


I have done it like this:

themes Index.css

Replaced:

h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;
}


With:

h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
text-align: center;
}


Its worked......But, seems like its so terribly simple that there has to be a huge downside to doing it like this (as I'm a potato when it comes to code).

margarett

The "problem" is that you have SMF's logo (or your slogan) on the right side

Find this (index.template.php):
echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
echo '
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
</div>

Replace with:
// echo '
// <img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
// echo '
// ', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
echo '
</div>


Now find find (index.css)
/* the main title, always stay at 45 pixels in height! */
h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;
}

remove that "float:left;" line

find
/* clearing the floats */
#top_section
{
min-height: 65px;
overflow: hidden;
margin-bottom: 3px;
}

replace with:
/* clearing the floats */
#top_section
{
min-height: 65px;
overflow: hidden;
margin-bottom: 3px;
text-align: center;
}


Should work.

edit: ninja'd :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

peps1

Thanks for the help guys!

@ margarett Had the SMF's logo removed with a mod, but handy to know how to do that my self now!

So just needed to do the CSS part.

Thanks again! 

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

peps1

Quote from: margarett on July 22, 2015, 05:33:07 PM
So, solved? ;)

knew there was something I forgotten to do!  :P

SOLVED!

Advertisement: