WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How Do I Center This Block of Text?

[Resolved] How Do I Center This Block of Text?

  • Hi. For one of the pages on this website, I chose the option to turn the sidebar off.

    As you can see, that text is shifted to the right of the screen.

    From looking at the home screen of the website, it appears that this is happening because of the left column, although I could be wrong.

    Would I need to create a custom page template in order to get this text to show up in the middle of the screen?

    If that is the only way to accomplish this, if you have a moment to review (and hopefully answer) the two questions I posted about creating a custom page template in this post, it would be appreciated.

    Thanks for your time.

Viewing 12 replies - 1 through 12 (of 12 total)
  • I came across this codex page on Conditional tags.

    Being that the name of one of the pages I want to remove the right sidebar from is titled “Thank You”, if I wanted to remove the sidebar for this particular page, would I do something like:

    <?php is_thank_you(); ?>

    Followed by the code that would remove the sidebar and adjust the screen accordingly?

    On the other hand, do I really want to remove the sidebar, being that the page editor is placing my text in the sidebar?

    Any help you can provide is appreciated, I’m a little lost on this one. Thanks!

    It is very difficult to diagnose this type of problem without being able to view the screen with the problem. If you post a link to your site where the problem can be seen, someone may be able to help you.

    Thanks for responding. Here’s a link to one of the pages with the issue.

    I get a ‘page not found’ error with that link. Is it a Private page?

    Yes it was. Sorry. I just made it un-private. Hopefully you can access it now

    Try adding this to the end of your style.css:

    .template-full-widch .col2 {
        float: none;
        margin: auto;
        width: 600px !important;
    }

    Note that it really is ‘template-full-widch’, not ‘template-full-width’.

    I will certainly try this when I get next to my machine in a few hours, however won’t this make the modification for all pages, instead of the select few pages where I want this modification made?

    Just curious. Thanks again.

    The .template-full-width part of the selector will only affect pages using the full width template.

    Does that answer your question?

    The .template-full-width part of the selector will only affect pages using the full width template.

    Does that answer your question?

    I think so, I’ll find out when I try it in a few hours. 🙂

    That works! Thank you! So, it basically triggers whenever I choose to turn the sidebar off for a particular page, then?

    thanks again.

    It works on all pages that are assigned the full width template.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] How Do I Center This Block of Text?’ is closed to new replies.
Skip to toolbar