• Hi,
    I’m looking to shrink the margins for a specific post. I was able to do so by adding this code to the top of the html in the post:
    <div class="maincontent" style="width:100%;">

    But.. how do I work with the alignment??
    I tried adding “float: center” and “align: center” within that same line of code.. no effect except for align left/right – but not center??

    How should this be done?

    Thanks! David

Viewing 4 replies - 1 through 4 (of 4 total)
  • If your theme uses the body_class() you should be able to style specific posts using the classes it generates.

    Thread Starter David Hartman

    (@documentaries)

    That stuff is over my head for now.

    I just need to add something to the code I had to make it center the content..
    `<div class=”maincontent” style=”width:100%;”>

    It works for scaling the margins, which I want to do also, just need the center bit.

    Simple right?

    Thanks Esmi.

    Try something like:

    <div class="maincontent" style="width:90%;margin:-left:auto;margin-right:auto;">

    Thread Starter David Hartman

    (@documentaries)

    hmm. yeah same problem I had – still aligns to the left.

    I had tried adding a float:right, which worked.. but still.. how to make it center, or at least define margins on either side?

    preview link: https://documentaries.org/wp-admin/post.php

    Thanks Esmi!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post Content Margins for specific post ??’ is closed to new replies.