• Welcome to Simple Machines Community Forum. Please login or sign up.
October 24, 2021, 12:22:46 AM

News:

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


How to center the logo in SMF 2.1 RC 3

Started by camefromwpandmybb, September 22, 2021, 04:15:46 PM

Previous topic - Next topic

camefromwpandmybb

I found a thread but that was for 2.0 RC3 and the coding is different.  Help?

Basically I don't need the site slogan, so I left that empty but where the site slogan space is, it pushes the header logo to the left and leaves huge amount of blank space on the right.
i hate wordpress, vanilla, mybb and phpbb

Antechinus

Add this to the end of index.css. :)
#siteslogan, img#smflogo {
    display: none;
}
h1.forumtitle {
    text-align: center;
}

camefromwpandmybb

No workie :(

The mobile view of the default theme, still shows to the left, i think maybe the coding for the site slogan needs to be removed?
i hate wordpress, vanilla, mybb and phpbb

Antechinus

Ok, hang on while I check responsive.css too.

Antechinus

Ok, find this in responsive.css:
h1.forumtitle a, h1.forumtitle {
    padding: 5px 0 0 4px;
    max-width: 300px;
    margin: 10px 0;
}

Change it to this:
h1.forumtitle a, h1.forumtitle {
    padding: 5px 0 0;
}

camefromwpandmybb

i hate wordpress, vanilla, mybb and phpbb

Antechinus

I tested it live. It works. Try hard refreshing your browser. If necessary, clear the cache too.

camefromwpandmybb

i hate wordpress, vanilla, mybb and phpbb

camefromwpandmybb

here are screen shots, desktop is fine, mobile notta

You cannot see attachments on this board.

You cannot see attachments on this board.
i hate wordpress, vanilla, mybb and phpbb

Antechinus

How are you getting that image as well as the forum name?

camefromwpandmybb

Quote from: Antechinus on September 23, 2021, 05:12:49 PMHow are you getting that image as well as the forum name?

I think I know what you are asking?  So the desktop image, you can see the spacing is equal left and right sides.  The mobile, I just resized my browser to show the mobile mode.  I also looked at it on 2 phones and the same thing, pushed to the left. as the forum name?  do not understand that part of the question
i hate wordpress, vanilla, mybb and phpbb

camefromwpandmybb

Quote from: Antechinus on September 23, 2021, 05:12:49 PMHow are you getting that image as well as the forum name?

Oh now I understand, the forum name I blocked out.  That is not text, it's text i converted to lineart as an image.
i hate wordpress, vanilla, mybb and phpbb

Antechinus

Ok, the problem is this in responsive.css:
    #header {
        margin-left: 0;
        margin-right: 0;
    }

Header width is set to 90% in index.css, which should have been overidden in responsive.css if the left and right margins were going to be removed (may be an RC4 bug - will check).

Solutions:
1/ Set #header width to auto:
#header {
    width: auto;
    margin-left: 0;
    margin-right: 0;
}
or...
2/ Set the margins back to what they originally were in index.css:
#header {
    margin: 0 auto;
}
Either of those should work.

camefromwpandmybb

I did the first one, not the second one, it worked.  which do you suggest to use?

thank you for your valuable time in this.
i hate wordpress, vanilla, mybb and phpbb

Antechinus

It doesn't really matter which one you use. They both do much the same thing. :)

camefromwpandmybb

Quote from: Antechinus on September 23, 2021, 07:46:29 PMIt doesn't really matter which one you use. They both do much the same thing. :)

Ok I thought with coders there is a way of doing things like less code, efficient coding.  proper syntax, etc.  you know how they say don't jumble all your coding together like a run on sentence, make it neat, legible, etc.  haha, you da man/woman (not sure what gender). thanks.
i hate wordpress, vanilla, mybb and phpbb

Antechinus

Technically the second option is marginally more efficient, but it's not something you will ever notice when using the site. :)

Advertisement: