• Resolved sophbess6

    (@sophbess6)


    Hello,

    I am having issues justifying my content to the center of each page. The homepage looks okay, but all of the other pages on my site are aligned to the left for some reason. I have tried disabling the plugins one by one, reverting back to the Twenty Nineteen theme (no change), and then enabling the plugins one at time, and that didn’t work. I have added various codes to the CSS, still no change. I also tried a code provided by Kale Pro, and there was no change there either.

    Any suggestions?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    @media (min-width: 992px) {
    .col-md-8 {
        width: 66.66666667%;
        margin: 0 auto;
        float: none;
    }
    }

    I’m not sure if it will have side effects because you have so many nested divs and not a really good naming scheme for them.

    To add or override CSS: use the “Additional CSS” option in the customizer. https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Learn to use the Chrome Developer Tools or Firefox Developer Tools to help you see and test changes to your CSS.

    Thread Starter sophbess6

    (@sophbess6)

    Thank you Steve – it worked! So far, no side effects, but I’ll keep and eye on it. Thank you also for your feedback on the nested divs – I really appreciate that! I’ll work on cleaning it up.

    Thread Starter sophbess6

    (@sophbess6)

    Actually I spoke too soon…the homepage was affected.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    try

    @media (min-width: 992px) {
    .col-md-8:not(.home) {
        width: 66.66666667%;
        margin: 0 auto;
        float: none;
    }
    }
    Thread Starter sophbess6

    (@sophbess6)

    Thanks Steve. That didn’t seem to work either. Could it be a theme or plugin issue, or do you think the issue lies within my code?

    Hi,

    the page layout seems to be divided into a content area on the left, and a sidebar to the right. This sidebar on the sub page has no content. Most likely, using a 1 column layout without a sidebar will resolve this.

    On the home page, the same layout is used, but the right sidebar has the “about me” widget. Using the suggested CSS will drop the widget below the content.

    So I suggest you check the page setup for the sub pages, and either add content to the sidebar, or make sure that a layout with only one column is selected. Even though the sidebar has no content, it still occupies some real estate on the page.

    Since you’re using a commercial theme, you should contact the developer for support:

    https://help.lyrathemes.com/

    Looks like in your theme includes a Full Width page template for turning off the sidebar on a page-by-page basis:

    Tip: A “Full Width” page template is available for overriding the sidebar selection here, so that any page can be displayed as a full width page if needed.

    https://help.lyrathemes.com/article/243-page-options

    Thread Starter sophbess6

    (@sophbess6)

    Hi @ronaldvw

    Thanks so much! I’ll look into that.

    Thanks @xdividr. You and Ronald are correct. I’m already beginning to see changes.

    Thanks again to both of you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Content Won’t Align Center – have tried everything’ is closed to new replies.