WordPress.org

Forums

[resolved] Full width page (8 posts)

  1. fitnessblogaustria
    Member
    Posted 1 year ago #

    Hello,
    I've addded this piece of code into my child themes custom style.css:

    @import url("../twentythirteen/style.css");
    body .site-header {
    }
    .entry-header,
    .entry-content,
    .entry-summary,
    .entry-meta {
    margin: 0 auto;
    max-width: 1600px;
    width: 95%;
    }

    and I've copied the page.php and named it full-width-page.php into my child theme folder

    It works perfectly fine and every page is fullwidth. The problem is that also every post is now full with. How do I have to rewrite the code so it only works for pages but not posts?
    (I'm using twenty thirteen)

    Thanks for your help!

  2. janet4now
    still awesome :)
    Posted 1 year ago #

    did you make any changes to the full-width-page.php template? You didn't mention why you did that.

    can you put a link to your site, please?

  3. fitnessblogaustria
    Member
    Posted 1 year ago #

    No I didn't make any other changes to the full-width-page.php file
    here's the site: http://www.athleticsaustria.at/

  4. janet4now
    still awesome :)
    Posted 1 year ago #

    You can remove that template from your child theme then, as this is only for modified files.
    You can remove this too from your style sheet as it does nothing:
    body .site-header {
    }

    Now add another style:

    .single .entry-header,
    .single .entry-content,
    .single .entry-summary,
    .single .entry-meta {
    margin: 0 auto;
    max-width: 1600px;
    width: 95%;
    }

    Change the max-width and width to the default settings (check your parent theme style.css) or another width that you want.

  5. fitnessblogaustria
    Member
    Posted 1 year ago #

    Thank you!!! It works perfectly now!

  6. fitnessblogaustria
    Member
    Posted 1 year ago #

    Topic resolved

  7. ycon
    Member
    Posted 1 year ago #

    Thanks for this! I did the same, and it's worked (www.yarnball.net.au). However it doesn't display full width on mobile devices. What CSS do I need to change for that? Thanks

  8. janet4now
    still awesome :)
    Posted 1 year ago #

    .site-header {
    background-color: #00024C;
    background-size: 100% auto !important;
    }

    You've modified your footer so it's no longer responsive. You'll have to decide what you want to do there.

Topic Closed

This topic has been closed to new replies.

About this Topic