WordPress.org

Ready to get started?Download WordPress

Forums

[Theme: Twenty Eleven]: padding pages (4 posts)

  1. rudyengels
    Member
    Posted 2 years ago #

    Hi,

    I'm using the twenty-eleven theme with a child theme at http://bcdevoskes.be
    I'd like to have the pages the same width/padding (just too much white space) as the posts on the homepage.
    I've installed Firebug to inspect the element but don't seem to find the right code.

  2. peredur
    Member
    Posted 2 years ago #

    Well, a post's width is determined by:

    #content {
        margin: 0 34% 0 7.6%;
        width: 58.4%;
    }

    The layout for a page is completely different and the width for the page content is determined by:

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

    So the width of the page content is 100% - 7.6% - 7.6% = 84.8% and centered (width: auto;).

    So if you want to make the content narrower you need to increase the left and right margins. For example, you could try this:

    .singular #content {
        margin: 0 20%;
        position: relative;
        width: auto;
    }

    (You probably don't need the .left-sidebar.singular #content. In fact including it might mess up something else. You'd have to check where it's used)

    It works in Firefox. Haven't tried it elsewhere.

    HTH

    Cheers

    PAE

  3. rudyengels
    Member
    Posted 2 years ago #

    Thanks for your complete reply!

    I've tried it with the following modification:

    .singular .entry-header, .singular .entry-content, .singular footer.entry-meta, .singular #comments-title {
        margin: 0 auto;
        width: 100%;
    }

    I'm analyzing you suggestion now and I'll give it a try!

  4. peredur
    Member
    Posted 2 years ago #

    Your solution will make the content wider (100% instead of 68.9%). I thought you wanted it the same as the content width for posts (i.e. narrower)?

    Cheers

    PAE

Topic Closed

This topic has been closed to new replies.

About this Topic