WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Theme : TwentyTwelve] Removing white space in between posts (5 posts)

  1. DavidGrzyb
    Member
    Posted 1 year ago #

    Hey everyone! I'm currently modifying the TwentyTwelve theme using a plugin allowing me to add on css. I am however now stuck on how to get rid of some white space in between posts on the homepage. My site is techneversleeps.com. When on the homepage, you will see that below the first post, the "Lorem Ipsum" post has a lot of white space above the title. This always happens for all the posts except the first one.

    Here is what I added to the CSS:

    #page {
    	margin-top: 18px;
    }
    
    .comment-content img, .widget img, img.header-image, .author-avatar img, img.wp-post-image {
    	border-radius: none!important;
    	box-shadow: none!important;
    }
    
    .site-header {
    	margin-top: -20px;
    	padding: 0;
    }
    
    .nav-menu {
    	margin-top: -25px;
    }
    
    #page {
    	margin-top: 18px;
    }
    
    article.sticky .featured-post {
    	display: none;
    }
    
    .entry-header .entry-title a {
    	color: grey;
    }

    The first post on the homepage is a sticky by the way. Any help is greatly appreciated! :)

  2. core-basic
    Blocked
    Posted 1 year ago #

    You're going to hear it from several others I'm sure, but let me start with this. Always use a child theme.

    http://codex.wordpress.org/Child_Themes

    As far as the margin. Just right click and inspect the post section in your browser, see what class or div is producing the bottom margin and modify it in your css. I kno that's vague but it is better to teach you to fish. No one here will really give you a specific CSS related answer.
    Good luck.

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Try adding this to your custom CSS:

    .site-content article {
        margin-bottom: 2rem;
    }

    Change the 2 to adjust the spacing if needed.

  4. DavidGrzyb
    Member
    Posted 1 year ago #

    I have used the tool to see the different containers however I was not able to get anything to my standards. I also clearly outlined that i'm using a plugin to add css, i'm not modifying the theme files in anyway directly. :)

    @WPyogi I'll try that :)

  5. DavidGrzyb
    Member
    Posted 1 year ago #

    YES THANKS FOR THE HELP IT WORKED! :)

Topic Closed

This topic has been closed to new replies.

About this Topic