Forums

[resolved] Sidebar does not adjust width automatically (3 posts)

  1. 5tar5hine
    Member
    Posted 9 months ago #

    After installing widget logic, the sidebar disappeared on all pages (page.php) except my blog page (index.php). I added <?php get_sidebar(); ?> to the page.php and voila, the sidebar is back. However, the width is not automatically adjusted anymore to fit the page names. The blog page still works fine.

    Here is the URL:
    http://swte1.accountsupport.com/blog/

    And this is the blog page:
    http://swte1.accountsupport.com/blog/?page_id=60

    I am a total rookie and slowly learning. Thank you in advance for your help and time (I searched for an answer, unsuccessfully).

  2. peredur
    Member
    Posted 9 months ago #

    You need to override this style rule in style.css:

    .singular #content, .left-sidebar.singular #content {
      margin: 0 7.6%;
      position: relative;
      width: auto;
    }

    You need:

    .singular #content, .left-sidebar.singular #content {
      margin: 0 7.6% 0 34%;
      width: 58.4%;
    }

    This will give your single page content the same position and dimensions as your posts page content.

    You should, of course, create a child theme and make the changes there.

    Cheers

    PAE

  3. 5tar5hine
    Member
    Posted 9 months ago #

    Worked like a charm!!!

    And thanks a lot for the tip with the child theme :)

Reply

You must log in to post.

About this Topic