• Resolved makta112

    (@makta112)


    Hello

    I’m trying to change the size of the links in the sidebar of my site under ‘POPULAR STORIES’.

    But I’m unable to do so. It should work with this code but it doesn’t:

    .popular-posts a {
        font-size: 13px !important;
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • Each popular link you have also encloses its text in a span element, like this:
    <a><span class="wpp-post-title">link text here</span></a>

    The class wpp-post-title has 3 css styles: font-size, font-weight, line-height, which are applied after the <a> style which you’re trying to change.

    So, you can remove the span element from the links or remove the styles from the wpp-post-title class or style the wpp-post-title instead of the <a> element.

    Thread Starter makta112

    (@makta112)

    Hi, thanks. That’s what I was looking for.

    Also, can you help me remove the line-height?

    I’ve tried adding line-height:normal and line-height:1em

    But it doesn’t go away.

    Line height isn’t something that you can really make go away, it’s similar to font-size in that way. Text has to have a font-size and, in a similar way, it has a line-height.

    So, in this situation, you should choose a line-height that makes sense (i.e. looks good). Try putting in different values to see what works for you.
    Here’s some info you might find useful: https://www.w3schools.com/cssref/pr_dim_line-height.asp

    Thread Starter makta112

    (@makta112)

    I can’t use negative value?

    Oh yes, you can ??

    Thread Starter makta112

    (@makta112)

    I’m trying but it’s not working??

    When I try changing the line-height of the class wpp-post-title to
    line-height:3em;
    or
    line-height:-2em;
    both work for me.

    (I’m using firebug, by the way, to make those changes on the fly and see them work.)

    Thread Starter makta112

    (@makta112)

    It doesn’t work when I add -2em?? And I’m using Firebug too.

    Does it not work when you try to change the css files or when you’re using Firebug?

    Thread Starter makta112

    (@makta112)

    I had to remove body {line-height:1.5} ??

    Everything is fine now.

    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not able to change font-size’ is closed to new replies.