How to center Site Logo?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tommyli
    Member
    • Jun 2013
    • 42
    • 5.0.X

    How to center Site Logo?

    Hi - I must be in the wrong place as no one has responded to 2 different posts, but I don't know where else to post, so here comes number 3.

    How do you center the Site Logo? Adjusting the CSS seems to have no effect for some reason.

    Thanks
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4021
    • 5.7.X

    #2
    The change will not be straightforward as the site logo and search box are in separate "table-cell". Tell me the width of your logo and I will try to work it out for you.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • tommyli
      Member
      • Jun 2013
      • 42
      • 5.0.X

      #3
      Thanks for the reply Glenn. The logo is 350x108px.

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4021
        • 5.7.X

        #4
        Try adding this in css_additional.css template:

        Code:
        [COLOR=#222222][FONT=Consolas][SIZE=12px]#header .header-cell {
            width: 50%;
            text-align: right;
        }[/SIZE][/FONT][/COLOR]
        [COLOR=#222222][FONT=Consolas][SIZE=12px]#header .toolbar {
           width: 50%; /* seems to work without this, but I don't know about IE (try with and without this) */
        }[/SIZE][/FONT][/COLOR]
        [COLOR=#222222][FONT=Consolas][SIZE=12px]#header .site-logo {
            max-width: 350px;
            display: inline-block;
            margin-right: -175px; /* half of the logo width */
        }
        #header .site-logo img {
            max-width: 350px;
            [/SIZE][/FONT][/COLOR][COLOR=#FF0000][FONT=Consolas][SIZE=12px]width: 350px;
            height: 108px;[/SIZE][/FONT][/COLOR]
        [COLOR=#222222][FONT=Consolas][SIZE=12px]}[/SIZE][/FONT][/COLOR]
        Since I don't have your logo with the exact same size, I don't know if the red part is needed. Try without it first, if that doesn't work, then add it.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        • tommyli
          Member
          • Jun 2013
          • 42
          • 5.0.X

          #5
          Would love to, but now I can't even login to my site to enable Site Editor for some reason. Haven't changed anything but some code in the additional CSS file today, so I have no clue why I would be shut out now. Tried on two different computers from two different IPs. I'll give it a bit and try again.

          Thanks and I'll keep you posted!

          Comment

          • tommyli
            Member
            • Jun 2013
            • 42
            • 5.0.X

            #6
            Seemed like a caching issue or something, but I got in, added the code and it's perfect! Thanks Glenn!

            Sorry for the multiple posts...

            Comment

            • glennrocksvb
              Former vBulletin Developer
              • Mar 2011
              • 4021
              • 5.7.X

              #7
              Cool. Glad to help.

              Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

              Comment

              Related Topics

              Collapse

              Working...