Margins of “entry-content”

Home Forums WordPress Themes – Premium Preference Margins of “entry-content”

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14216
    Roland
    Member

    Andre:

    What’s the best way for me to Add margin space to the “Entry-content” on this page: http://dariahowell.com/

    ~Rojac
    margins.jpg

    Attachments:
    You must be logged in to view attached files.
    #18435
    Sushil Adhikari
    Moderator

    Adding custom css to the entry-content container. Either margin or padding.
    Also make sure if you modify core files of the theme that you use a child theme instead of the parent theme so you can do theme updates over time. If it’s just css and if you use Jetpack (plugin), you can use the Edit CSS feature instead of a child theme.

    #18550
    Roland
    Member

    And do I make those changes in the “content page php” file or the “content php” file, Andre?

    #18552
    Sushil Adhikari
    Moderator

    The style.css actually.

    #18554
    Roland
    Member

    OMG – you said custom css and I flaked-out — sorry.

    So this is what I put into my “stylesheet.css”

    p
    {
    margin-left:35px;
    }

    But . . . the interior page titles aren’t responding (the rest of the page accepts the new margins. See here: http://dariahowell.com/is-this-you/)

    What am I forgetting?

    #18556
    Sushil Adhikari
    Moderator

    The title is outside the entry-content container, but what you could do is this:

    article.type-page {
    margin-left: 35px;
    }

    The heading and content is wrapped in the article container. You could do it as a margin or padding. Be aware though when your site is viewed in a mobile environment, that margin or padding is going to be there.

    At the bottom of the style.css add this:

    @media (max-width: 767px) {
    article.type-page {
    margin-left: 0;
    }
    }
    #18557
    Roland
    Member

    That was close . . .

    This is what I had input

    p
    {
    margin-left:35px;
    }

    article.type-page {
    margin-left: 35px;
    }

    @media (max-width: 767px) {
    article.type-page {
    margin-left: 0;
    }
    }

    . . . but then the issue was that the entry-content container shifted 35 px to the right of the title. So . . . now it’s working with this:

    article.type-page {
    margin-left: 35px;
    }

    @media (max-width: 767px) {
    article.type-page {
    margin-left: 0;
    }
    }

    Thanks for the reminder about mobile viewing. At the risk of horking this all up . . . should I have used a percentage (and should I still) instead of fixed “35px” ???

    #14217
    Sushil Adhikari
    Moderator

    you could do % if you want…generally anything that is relative sizing will be better, but it also depends on what it’s being used (or applied) to.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.