Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: TheDragon on October 11, 2009, 04:46:29 PM

Title: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 04:46:29 PM
I am using Default theme - no mods (yet)
v 2.0 RC1.2
I DID get my logo into top area using the ACP  8)
so, how do I center it?   :-\
and remove that little (@25 pixel) gradient across the top
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: Kill Em All on October 11, 2009, 05:01:45 PM
Well for your logo, take a look at this first:  How do I delete the Simple Machines logo on the default SMF theme? (http://docs.simplemachines.org/index.php?topic=1153.0)

But instead add the center tags.

<center>
<td align="right" class="catbg">
               <img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
            </td>
</center>

Try that.

For the gradient across the top, that will be some where in your style.css.
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 05:24:43 PM
well, I DO appreciate your reply
BUT, as I said, I had no problem to put MY logo INTO the header
and, it was MUCH easier to remove the smflogo, just by replacing the gif with a single clear pixel with the same name
and ti say SOMEWHERE in the style.css=
well - I guess I could search line by line
but that is wh=y I asked here for a suggestion  ;)
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: Kill Em All on October 11, 2009, 05:32:18 PM
Well no, that is just so that you can center it. You arent suppose to delete those lines, just edit them for that code.
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 05:41:47 PM
also - looks like that code is from v 1.x
I am using v2.0
and the section is full of variables


Quote<div class="tborder">
        <div class="catbg">
            <img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" />
            <h1>';

    if (empty($settings['header_logo_url']))
        echo $context['forum_name_html_safe'];
    else
        echo '
                <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';

    echo '
            </h1>
        </div>';
surely SOMEONE has asked before me to have the LOGO centered?????
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: Antechinus on October 11, 2009, 05:54:05 PM
Quote from: Kill Em All on October 11, 2009, 05:01:45 PM
Well for your logo, take a look at this first:  How do I delete the Simple Machines logo on the default SMF theme? (http://docs.simplemachines.org/index.php?topic=1153.0)

But instead add the center tags.

<center>
<td align="right" class="catbg">
               <img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
            </td>
</center>

Try that.

For the gradient across the top, that will be some where in your style.css.
Bad solution. Two points:

1/ Having <center> and align="right" is not what you could call optimal coding. ;)
2/ The <center> tags will only center anything in that particular table cell.

Anyway this subject has been dealt with umpteen times. Try running a search for "headerbg" in posts by me. I don't have a link handy but I've explained this to many people.
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 06:03:00 PM
again - I DO appreciate your reply's
but the code which you said was NOT optimal
is the ORIGINAL SOURCE code from SMF ! - not from ME  :P
I put it there just to show you that (I presume) your suggestions were v1.x
as it was not even close to the embedded code from v 2.0

so, still looking for a simple solution to center the logo image - I did search before I did my original post  ;)
also - it was not so simple to get rid of the gradient - but I DID find the culprit (see below)
it is the BACKGROUND image (very clever) that repeats ONLY in x !!
and the balance of the top window was defaulting to the background color
so, I DL the image, and just 'painted' it the same color as the underlying color of my logo
(which I had ALREADY customized to tomatch the SMF default theme - ie LOOKS GREAT (integrated !! )  8)

Quote/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers. */
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td
{
    background: url(images/catbg.jpg) #88A6C0 repeat-x;
    color: #ffffff;
    padding-left: 10px;
    padding-right: 10px;
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: Antechinus on October 11, 2009, 06:06:23 PM
I was not replying to you. I was replying to Kill Em All's suggested code. That is why I quoted him.
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: Kill Em All on October 11, 2009, 06:09:32 PM
I am very sorry, maybe take a look at this topic.

http://www.simplemachines.org/community/index.php?topic=338896.0
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 06:15:18 PM
Quote from: Antechinus on October 11, 2009, 06:06:23 PM
I was not replying to you. I was replying to Kill Em All's suggested code. That is why I quoted him.

oops = ;)

Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 06:17:20 PM
Quote from: Kill Em All on October 11, 2009, 06:09:32 PM
I am very sorry, maybe take a look at this topic.

http://www.simplemachines.org/community/index.php?topic=338896.0

thanks = close = seems to be v1.10 (at least part of it)
and, the quick fix I did - also broke the pseudo gradient in ALL the category headers
so, I will just make a NEW BG image for just the TOP header
Title: Re: logo - how to center? and how to remove top strip of medium blue
Post by: TheDragon on October 11, 2009, 07:20:53 PM
ok - got it to work = I SHARE my results with everyone
I made a NEW class in the style.css
Quote.catbgtop
{
    background: url(images/catbgtop.jpg) #88A6C0 repeat-x;
    color: #ffffff;
    display: block;   
    margin-left: auto;
    margin-right: auto;
}

then I edited the index.template.php as follows

<div class="catbgtop">
            <img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines

Forum" />
            <h1>';

    if (empty($settings['header_logo_url']))
        echo $context['forum_name_html_safe'];
    else
        echo '
                <img class="catbgtop" src="', $settings['header_logo_url'], '" alt="',

$context['forum_name_html_safe'], '" />';

I could probably also just edit out the calls to the smflogo.gif
(but do not want to risk 'breaking something'

anyway -- got a centered logo that is color matched !