• The line spacing between headers and paragraph’s are really bugging me..

    For example on my website http://www.greenloaningmansion.co.uk on the ‘Details’ page,
    there is just one space between the header and text for all sections when I’m creating it, however the actual distance between the header and text is different for both of them.

    Is there any way to alter this distance with code or is it a theme setting kind of thing?

    Thanks!

    Will

Viewing 5 replies - 1 through 5 (of 5 total)
  • It looks to me that you are using bold text to emphasise your headers.

    Maybe you should try using the header option in the editor and pehaps set that heading text as Header 3?

    Thread Starter williewalters18

    (@williewalters18)

    On the ‘Details’ page I am using Header 3 for the headers, I did use bold text for another page as it made it look nicer not having such a big gap.

    div#page-container > h3 {
    margin-bottom: 5px;
    }

    That CSS rule should reset the bottom margin to 5px. You can use whatever value you wish.

    If your theme does not have the facility to add custom CSS you can use a plugin to do that. If you don’t want to use a plugin you should do it using a child theme. If you try to alter the themes files directly you will lose any edits if the theme is updated.

    Thread Starter williewalters18

    (@williewalters18)

    Thank you very much that works!

    Is it possible to alter that to be page specific? So I can have different sized margins on different pages for Header 3?

    Each page will have its own ID which will be shown as a class on the <body> element like this:

    <body class="page page-id-108 page-template-default">

    Therefore:

    .page-id-108 div#page-container > h3 {
    margin-bottom: 5px;
    }

    will only apply to the Spa page.

    You can see the body element if you use your browser tool or a Firefox plugin like Firebug to inspect the code.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Line spacing..’ is closed to new replies.