WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing Comment Space (4 posts)

  1. Levi
    Member
    Posted 1 year ago #

    Context: The page I am developing is purely informational -- it is not intended to be interactive via the commenting section of the page. Thus, I have removed all ability to comment via the dashboard.

    Desired Action: I am seeking to remove the space between the bottom of the content and the top of the footer. Therefore, I have no need to retain the space between the content and the top of the footer. Currently, there is a line at the bottom of the content and another line at the top of the footer. I would really like to also remove the line below the content as well as the commenting space. I am sure this is a simple CSS fix, but it's stumped me all afternoon.

    Background: I am running a WP TwentyTwelve child theme, self-hosted, currently in a development atmosphere using MAMP. Therefore, I cannot unfortunately share the page with the forum. However, I have taken a screen shot of the space I am trying to eliminate. Available here: http://imgur.com/TJ8iDYf

    Thanks for your help in advance!

  2. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    That margin is coming from the .site-content article CSS rule on line 958 of style.css (assuming the style is inherited from Twenty Twelve itself).

    To override it for all pages:

    .page .site-content article {
        margin-bottom: 0px;
        border-bottom: none /* if you want to remove the double-ruled line */
    }

    If instead of overriding on all pages, you only want to override on a specific page template, named template-foobar.php:

    .page-template-template-foobar-php .site-content article {
        margin-bottom: 0px;
        border-bottom: none /* if you want to remove the double-ruled line */
    }

    That CSS class construct is:

    .page-template-{filename-ext}

    Note also that there is some top margin on footer[role="contentinfo"], that you may want to override similarly.

  3. Levi
    Member
    Posted 1 year ago #

    Thanks, Chip. I'll let you know how it works later today.

  4. Levi
    Member
    Posted 1 year ago #

    Thanks for your help, Chip. That did the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic