Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #276399

    Pamela
    Participant

    I found this code in a past thread to decrease letter spacing in headers, but it doesn’t work for me. I even set a negative number and nothing is happening.

    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    letter-spacing: 0 !important;
    }

    Please help! Thx.

    Pam

    #276495

    Lely
    Moderator

    Hello Pam,

    Thanks for posting in.

    The above CSS code for letter spacing should work, unless it is overwritten by more CSS specific rules for certain headers. Would you mind sharing the specific URL and headline where the above code is not working?

    I also checked your CSS code and I found this :

    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
      letter-spacing: -1 !important;
    }

    You should add px after -1 for that to work.

    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
      letter-spacing: -1px !important;
    }

    We can only omit the unit px if the value is 0.

    Hope this helps.
    Thanks.

    #276504

    Pamela
    Participant

    I’ve also tried this code to decrease spacing after headings and it doesn’t seem to work:

    h1, .h1{margin-bottom: -2px !important;
    h2, .h2{margin-bottom: 0px !important;
    }

    You can see what I’m talking about here;
    http://574.c24.myftpupload.com/building-automation/

    I would like to tighten up the line-spacing.

    Thank you!

    #276544

    Pamela
    Participant

    Thank you! I got the above CSS to work by making the little change with the px so thank you for catching that!

    Now I just have a problem with the line spacing in the above post.

    #276572

    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    Kindly add following CSS under Custom > CSS in the Customizer and let us know if that’s what you looking for:

    h1, h2, h4 {
        margin-top: 20px;
    }
    

    Thanks.

    #276593

    Pamela
    Participant

    This code doesn’t seem to be doing anything. I am really trying to decrease the space between the orange and black parts of the headline -tighten the gap between “productivity” and “not to mention cost savings”

    http://574.c24.myftpupload.com/building-automation/

    #276648

    Christopher
    Moderator

    Hi there,

    Add class="mtn" to h2 headline to remove top margin. your new code would be :

    <h2 class="mtn" style="text-align: center;">Smarter systems mean lower operational costs and more secure environments.</h2>

    Thanks.

    #277713

    Pamela
    Participant

    Thank you. That worked but now if I want to add a little space back in I thought I would adjust the margin-bottom for the h1 type I have above it, but why doesn’t this do anything?

    h1, .h1{
    margin-bottom: 0 !important;
    }

    #277731

    Paul R
    Moderator

    Hi,

    If you would like to add some space, change 0 to larger value.

    eg.

    
    h1, .h1{
       margin-bottom: 20px !important;
    }
    

    Thanks

    #277785

    Pamela
    Participant

    Perfect! Thank you!

    #277807

    Thai
    Moderator

    You’re most welcome.