Support » Themes and Templates » Centering logo div

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    What CSS did you try?

    Honestly, I tried about 3 different methods, none worked so I didn’t keep a record of them :-/

    WPyogi

    (@wpyogi)

    Forum Moderator

    Try adding this to your child theme style.css file:

    #logo {
        float: none;
    }
    
    #logo img {
        display: table;
        margin: 0 auto;
    }

    WPyogi, that worked – if you’re ever in Charleston, SC I owe you a beer ;-). Gracias.

    Update – any idea why the above code in my child theme would cause the logo to be invisible on IE 8/9 ? When testing, I switch from my child theme to the base Mosaic theme and logo displays properly (on the left as originally intended).

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    In IE press F12 and make sure you’re not viewing the site in quirks mode.

    I’m testing using Browserstack (I’m a mac guy) so I’ll have to look at this later. Will give it a try though, thanks.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    It may be something to do with display table, so just to be safe instead of this style:

    #logo img {
        display: table;
        margin: 0 auto;
    }

    Can you try this equivalent:

    h1#site-title { text-align: center; }

    It’s working on the home page, not others.. ?

    Ok, think I got it with:

    h1#site-title, h1#site-title a, div#site-title, div#site-title a
    { text-align: center;
    }

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Centering logo div’ is closed to new replies.