WordPress.org

Ready to get started?Download WordPress

Forums

AlbinoMouse
[resolved] Title to content margin (7 posts)

  1. darristan
    Member
    Posted 6 months ago #

    http://i.imgur.com/dFGOGNr.png

    How do I lessen the spacing between them? BTW, I removed the entry-header / entry-title part on content-page.php

    Great theme, thanks~!

  2. pixelstrolch
    Member
    Theme Author

    Posted 5 months ago #

    I believe your screenshot shows a h3 title at the beginning of the post. Remove the margin-top from the first title and you'll get less space.

    .entry-content h3:first-child {
       margin-top: 0;
    }

    If this is still not enough, you need to change the margin of #content.

    Cheers Stefan

  3. darristan
    Member
    Posted 5 months ago #

    Hi. Thanks for the reply. I tried to change the following but don't see any effect.

    #content {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    }

    or

    .entry-content h3:first-child {
    margin-top: 0;
    }

    Thanks in advance

  4. pixelstrolch
    Member
    Theme Author

    Posted 5 months ago #

    Hi darristan,

    I tested removing margin-top from .entry-content>h3:first-child. That worked. The usual space above the first h3 title was removed. I'm not sure if the title on your screenshot is a h3 title. However you should add the page id to that css rule, otherwise you'll affect the whole website.

    If you wanna change the margin of #content you have to consider the media queries. If you add a new css rule like

    #content {
    margin-top: 1.5em;
    }

    you will only change something on small screens.

    For bigger screens you need

    @media screen and (min-width: 768px) {
       #content {
          ...
       }
    }

    Cheers Stefan

  5. darristan
    Member
    Posted 5 months ago #

    Again, thanks for your patience. Yes, it is a H3 title that I'm asking. I could not find any .entry-content>h3:first-child in the default CSS at all.

    May you please check.
    http://pastebin.com/BXiVdp7S

    Thanks.

  6. Nhat
    Member
    Posted 5 months ago #

    Hi,

    I believe the theme author means to tell you to add that line to the bottom of your main theme's CSS or your child-theme's CSS; or if you have the official WordPress Jetpack installed, you can go to Appearance --> Edit CSS and add it there.

    With CSS, generally whatever you write at the bottom will overwrite whatever you wrote above (unless it is declared as !important).

    Nhat

  7. pixelstrolch
    Member
    Theme Author

    Posted 5 months ago #

    Hi Nath, you got me. Thanks you made that clear.
    Cheers Stefan

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.