• [moderator note: topic title moderated – http://codex.ww.wp.xz.cn/Forum_Welcome#Choose_A_Good_Topic_Title ]

    Hello WP lovers, my question is about a stupid thing that I cant do it by my self…

    How can I set the widget text line height to be different than the post and pages line height?

    For post and pages I use 30px and for widget I need it to be 20px.

    How can I get that? Please help me!

    Thanks in advance for any help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Is it a text widget you are adding?

    You could just add a

    <div style="line-height:20px;">
       content
    </div>

    around it.

    If its another widget you could download a plugin to add css (like: https://ww.wp.xz.cn/plugins/simple-custom-css/ )

    It would help us help you if you included a link to your website. Without this information I have to speak in generalities, telling you how to find the required information. With this information I could give you a specific solution.

    Suggest that you install a browser inspector like firebug, it shows you how your html is formed and how your css is working. This will let you easily identify and target your css changes.

    If you are not using a child theme already then, create a child theme now http://codex.ww.wp.xz.cn/Child_Themes
    Your css changes will go into the style.css file of your child theme.

    What theme are you using?

    Thread Starter jefonte

    (@jefonte)

    Hello guys, and thanks.

    The theme is ThemeStarta and this is the site: http://lanzatublog.com

    If you look at the text below the image in the widget “Acerca de Jesus Fonte” (About Jesus Fonte) I need that text line height to be 20px.

    THANKS in advance for any help guys.

    for all the sidebar lines:

    .sidewidgetinner { line-height: 20px; }

    or more specific for any textwidgets:

    .sidewidgetinner .textwidget { line-height: 20px; }

    or, as @click245 already suggested, add the line-height into the html tag in the textwidget:

    <p style="text-align: left; line-height: 20px;"><span style=" font-size: 12pt; font-family: verdana,geneva;">Soy .....etc.....?&nbsp;<a title="Quien soy" href="http://lanzatublog.com/quien-soy/">+ INFO</a></span></p>

    Thread Starter jefonte

    (@jefonte)

    GRACIAS AMIGO!! Thank you very much to all of you guys. it was exactly what I was looking for.

    Thanks a lot πŸ™‚

    Thread Starter jefonte

    (@jefonte)

    BTW guys, been all of you so kind with me, can any of you tell me how can I can center align the widget title?

    THANKS in advance for any advice πŸ™‚

    Try this:

    .sidebar h4.widgetheading {
      text-align: center;
    }
    Thread Starter jefonte

    (@jefonte)

    Hi Paul, that works perfect.
    Thank you very much πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘different line height for posts and widgets’ is closed to new replies.