• Hi

    I am using the Twenty Thirteen theme on 4.2.2 WordPress, this is the site, https://www.epaccs.com

    The margin for the main content was very large leaving the content quite slim down the middle in the default twentythirteen theme. So in my child theme I managed to find someone who had a similar problem that added the following code to a child theme:

    .entry-header,
    .entry-content,
    .entry-summary, .entry-meta {
     max-width: 100%;
     width: auto;
     /* The margin-left: 100px; style controls what you want */
    margin-left: 100px;
    margin-right: 100px;
    }

    This achieved what I wanted at first by putting the margin in line with the Navigation and the Header text like this: https://i58.tinypic.com/kdk561.jpg

    But when I started using the website on other resolutions, and mobile, I noticed that the margin would stay at 100px obviously, so therefore would look all wonky, for example: https://i59.tinypic.com/2liykwh.jpg

    So my question is, how can I get the margins to always stay in line with the title header and navigation menu?

    Thanks in advance for any help ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi eppacs,

    You have a nice website, i took a look to your problem.

    here is what I found :

    1- As you have fixed margins, this means yoy will have sames margins no matter what size the display was. In order to deal with this, you have to set an auto width.

    2- The size of th content is set to auto, this means it changes with the display. This affects look with the margins that stay fix.

    I came up with this code snippet :

    .entry-header,
    .entry-content,
    .entry-summary, .entry-meta {
     max-width: 1040px;
     width: 100%;
     /* The margin-left: 100px; style controls what you want */
    margin-left: auto;
    margin-right: auto;
    }

    Replace the snippet you used with this one and it will work.

    Here is how it looked in my browser :
    https://screencast.com/t/LmZ6jsQYu

    Cheers!

    Rachid.

    Thread Starter epaccs

    (@epaccs)

    Rachid, you da man!!! thanks so much. Only problem is, it seems to have disabled the mini mobile site? but I’m not bothered, its so much better now, thanks again.

    I am very happy it worked for you.

    Don’t hesitate if you have any question or problem.

    Cheers !

    Rachid.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: TwentyThirteen] Main content margins’ is closed to new replies.