WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How Do I Center This Block of Text? (13 posts)

  1. agfreesafety
    Member
    Posted 1 year ago #

    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.

  2. agfreesafety
    Member
    Posted 1 year ago #

    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!

  3. vtxyzzy
    Member
    Posted 1 year ago #

    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.

  4. agfreesafety
    Member
    Posted 1 year ago #

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

  5. vtxyzzy
    Member
    Posted 1 year ago #

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

  6. agfreesafety
    Member
    Posted 1 year ago #

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

  7. vtxyzzy
    Member
    Posted 1 year ago #

    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'.

  8. agfreesafety
    Member
    Posted 1 year ago #

    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.

  9. vtxyzzy
    Member
    Posted 1 year ago #

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

    Does that answer your question?

  10. agfreesafety
    Member
    Posted 1 year ago #

    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. :-)

  11. agfreesafety
    Member
    Posted 1 year ago #

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

  12. agfreesafety
    Member
    Posted 1 year ago #

    thanks again.

  13. vtxyzzy
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic