Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1360139
    ylpl
    Participant

    Hi there,

    My site is http://dev.ylpl.net/wordpress/

    I’m trying to eliminate spacing on specific pages such as the spacing between my paragraph and bullet points on http://dev.ylpl.net/wordpress/book-discussion-groups/ or http://dev.ylpl.net/wordpress/library-of-things/3d-printing/

    I’ve search the support forum and found a code that works:
    p { margin: 0 !important; }

    Unfortunately, this applies globally to my website when I apply it in my Custom CSS. It changes my topbar, for example. Now I’ve tried applying that code on the individual pages under Body CSS Classes but it doesn’t seem to apply.

    Is there another method or code you recommend that would take care of this issue?

    Thank you,

    Daniel

    #1360247
    ylpl
    Participant

    Hi again,

    I think I found a code that works for specific pages if I use the page-id. So applied this to both pages mentioned above and it worked!

    .page-id-1218 .page p {
    margin-top:0;
    margin-bottom:0;
    }

    .page-id-251 .page p {
    margin-top:0;
    margin-bottom:0;
    }

    Does this sound about right? If so, how would I apply this to multiple pages?

    Thanks again,

    Daniel

    #1360316
    Jade
    Moderator

    Hi Daniel,

    The code seems to be correct.

    If you want to add it to multiple pages, you can get the ID for each page and add the selector on the page like:

    .page-id-251 .page p,
    .page-id-1218 .page p,
    .page-id-300 .page p {
        margin-top:0;
        margin-bottom:0;
    }

    Since there are three selectors on the code, the three pages with the page ID will get the same CSS.

    Hope this helps.

    #1361537
    ylpl
    Participant

    Great! Thanks again! 🙂

    #1361538
    Jade
    Moderator

    You’re welcome!

  • <script> jQuery(function($){ $("#no-reply-1360139 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>