• Hello all,

    Thank you for reading this message.

    Our site is using the 2014 theme, and up to a few weeks ago, the site aligned to center just fine. Now, everything wants to align-left.

    We have tried to utilize the following code in CSS without success.

    margin-left: auto;
    margin-right: auto;

    With that in mind, does anyone have a suggestion on how we might align our WordPress site to center?

    Thanks again for reading this message and for any assistance rendered.

    Regards,
    Jeff
    vinylunderground.com

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

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

    (@sterndata)

    Volunteer Forum Moderator

    .site {
      margin: 0 auto;
    }

    To add 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 to help you see and test changes to your CSS.

    Thread Starter vinylunderground

    (@vinylunderground)

    Hello Steve,

    First, thank you for your kind assistance. The plugin to protect images has been disabled.

    I will try the code that you suggest and report back.

    Best regards,
    Jeff

    Thread Starter vinylunderground

    (@vinylunderground)

    Steve,

    I have utilized the code as suggested without success. I am pretty much out of ideas with the center alignment problem. To be honest, I am surprised that a “left-center-right” alignment button isn’t present within the appearance section. A place where you select the desired alignment, then click to save.

    In any event, I appreciate your effort with this dilemma.

    Best regards,
    Jeff

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Looking at your site, I do not see that you made the change.

    Thread Starter vinylunderground

    (@vinylunderground)

    Steve,

    When you say, “Looking at your site, I do not see that you made the change”. If you are referring to the right click protection, I have already deleted the plugin.

    If you mean that the code is not present in the CSS. After I found that it had no benefit in our current situation, I too removed the suggestion.

    I appreciate your assistance with this problem Steve. You are a good person for trying.

    Regards,
    Jeff

    Thread Starter vinylunderground

    (@vinylunderground)

    Steve,

    I see that this problem only affects the index page now. I will continue to poke around, in an effort to resolve this dilemma.

    Jeff

    update, there are a few other pages affected as well.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you mean that the code is not present in the CSS. After I found that it had no benefit in our current situation, I too removed the suggestion.

    The code works; I suspect you put it in incorrectly.

    Thread Starter vinylunderground

    (@vinylunderground)

    Steve,

    Thanks again for your assistance.

    I wrote the code under 3.0 Basic as such.
    .site {

    position: relative;
    margin-left: auto;
    margin-right: auto;
    }

    I also tried it this way.
    #page {
    margin-left: auto;
    margin-right: auto;
    }

    Please point out where I placed the code incorrectly.

    Thanks again!

    Jeff

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    >> wrote the code under 3.0 Basic as such. << What is that?

    That’s not the code I provided.

    .site {
      margin: 0 auto;
    }

    Put this in the Additional CSS part in the customizer, also as noted above.

    Thread Starter vinylunderground

    (@vinylunderground)

    Hi Steve,

    I did your code as well. I just forgot to include it in these examples. I have done several different suggestions without success.

    I am beginning to think, that perhaps it is something other than this code. I have noticed that some posts appear normal, where as the front page and several others, are aligned left.

    In any event, thanks again for your kind assistance Steve. It looks like this problem won’t be solved. It will just leave us scratching our heads.

    Jeff

    Hello!

    The code that Steve provided most certainly works! I was curious about why it would not be working on your side of things and took another look.

    Looks like you’re using the plugin Fast Velocity Minify, which takes your css files, minifies them, and caches them.

    After adding steve’s code:

    .site {
      margin: 0 auto;
    }

    Be sure to navigate to Fast Velocity Minify’s settings, and purge the cache in that plugin.

    Lastly, view your site in “Incognito” or “Private Browsing” mode, as this will display an uncached version of your site, hopefully reflecting the changes you made.

    Thread Starter vinylunderground

    (@vinylunderground)

    Hey moonsloth,

    That did it! I cleared the cache from WITHIN the Fast Velocity Minify plugin. The results are, all posts and pages are aligned to the center.

    I would like to thank you and Steve, for your excellent assistance with this problem. Top notch!

    Best regards,
    Jeff

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How do I center a wordpress site’ is closed to new replies.