New Landing How can we help? Atelier Reducing Line Height for H1 element without changing font optios

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Atelier
  • #199920
    ninesolutions
    Member
    Post count: 192

    Hello,

    I am trying to do some mobile optimization for this page of my site (pasted in url above, please view in mobile for hidden mobile elements to appear.) It is just normal text but currently the line spacing is too big.

    I am using my h1 text style as i need the font style of it, but i would like to minimize the line spacing for just this group of text, without changing the font options, as it will affect the rest of my desktop site.

    Is it possible to do that? maybe with using span? i can change font size with span but i cant seem to change line height with span… please assist me. Thanks!

    This is a screen shot of the line height which i want to reduce: http://i.imgur.com/eZz7XIG.png

    #200007
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add this to your custom css:

    @media only screen and (max-width: 479px) { 
    .spb-asset-content > h1 {
      line-height: 30px;
    }
    }

    – Kyle

    #200225
    ninesolutions
    Member
    Post count: 192

    Hi Kyle, sorry I tried this but it will change the line spacing of all my h1 text in mobile.

    As i have other h1 text in mobile, i would only like to change the line spacing of the h1 text of a specific page. Is there anyway to custom this ccs to a specific page? or just use some span code?

    thanks so much Kyle!

    #200227
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You can add the page id class to the beginning off the css, for e.g:

    @media only screen and (max-width: 479px) { 
    .pageid-1340 .spb-asset-content > h1 {
      line-height: 30px;
    }
    }

    – Kyle

    #200236
    ninesolutions
    Member
    Post count: 192

    Thanks for the quick reply Kyle!

    The initial CSS you gave me was working, but the one with the post ID has no effect even after i have changed to my post number.

    Am i missing something?

    Thanks Kyle!

    #200239
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Should be:

    @media only screen and (max-width: 479px) { 
    .page-id-15115 .spb-asset-content > h1 {
      line-height: 30px;
    }
    }

    – Kyle

    #200261
    ninesolutions
    Member
    Post count: 192

    Thanks Kyle, it is all great now!

    Appreciate you help!

    #200263
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register