• Resolved aliciaatsttech

    (@aliciaatsttech)


    Hi!

    Have been struggling with trying to figure out how to center the main navigation of our site with custom CSS. I’ve went into Inspect and have tried referencing just about every ID and Class i could find.

    Would love the help!

    Site in question: https://st-tech.blog

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Alicia,

    thanks for using Tuto WordPress theme.

    When it comes to CSS customizations, you can always use your browsers inspection tool to inspect the elements on your site and then use that information to add your own code modifications, for example:

    .mh-main-nav ul { display: table; margin: 0 auto; }

    You can add CSS code in your WordPress dashboard under Appearance => Customize => Additional CSS.

    Thread Starter aliciaatsttech

    (@aliciaatsttech)

    Thanks for your speedy reply!

    I’m still having an issue. Hoping you can lend another hand.

    The navigation is centering in the middle similar to how the mobile version looks even when visiting on desktop. Is there anyway for us to be able to center it but the nav be horizontal instead of vertical?

    It seems you’ve applied several code modifications and these are breaking the navigation. Please remove all your modifications except the code we gave you and then you won’t have this issue.

    Thread Starter aliciaatsttech

    (@aliciaatsttech)

    Thanks! I think we figured it out.

    Sorry, but that doesn’t seem to be the case. Your stylesheet definitely has been modified, for example it contains:

    .mh-navigation li { float: center; }

    This isn’t how the theme has been coded. In addition, you shouldn’t modify core theme files. For code customizations always use a child theme, otherwise your modifications will be lost after theme updates anyway.

    As mentioned before, please restore the original codebase of the theme and after that just add the code which we’ve provided in your WordPress dashboard under Appearance => Customize => Additional CSS.

    If your site is cached, then you should also clear the cache after you’ve applied any changes or after you’ve restored the original codebase.

    Thread Starter aliciaatsttech

    (@aliciaatsttech)

    Yeah on the back-end, the theme CSS was correct but for some reason upon publishing it changed. It was likely a plug-in. We have since changed the theme of our site because we were having so many issues.

    Thanks though!

    Please keep in mind that your issues were related to your incorrect code modifications. There are no issues with the theme as it is. Anyway, you’re very welcome and good luck with your website.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Center Nav?’ is closed to new replies.