WordPress.org

Forums

How can I stretch my content across when there is no sidebar? (4 posts)

  1. ilikecoffeepaper
    Member
    Posted 4 years ago #

    Hello,

    I'm trying to figure out how I stretch my content across the full length of my header on all the pages but the main blog. My site is here. Right now, I am using the Content-Sidebar layout for the blog page, and the rest of the pages use a template I created called 'pagenosidebar.php'. This is just page.php without the sidebar included, so the sidebar is not there but the content area still only stretches part way.

    Thanks!

  2. jack randall
    Member
    Posted 4 years ago #

    you'll probably need to change the width of the content area in your css to fit the new template (might be a good idea to create a new id or class for this so it doesn't stuff up your regular pages!).

  3. Michael
    Forum Moderator
    Posted 4 years ago #

    using the body_class generated for the template, you could try to add these styles to style.css:

    .page-template-pagenosidebar-php #content,
    .page-template-pagenosidebar-php #content-container
    { width:100%!important; }
  4. ilikecoffeepaper
    Member
    Posted 4 years ago #

    Great, worked perfectly! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic