WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Separating lines in sidebar (4 posts)

  1. kssheldon
    Member
    Posted 2 years ago #

    Hello,

    I am using theme Twenty Eleven and I set up a Child Theme so that I can alter code and update the sidebar of my main page.

    Here is my site: http://www.biogeographyresearch.org/. I have a sidebar that should have four lines with the following:

    Postdoctoral Research Fellow
    Department of Biology
    University of Utah
    Salt Lake City, UT, USA

    Previously, I found the font of my sidebar too small, so I added the following code to increase font size:

    .widget a {
    color: black;
    font-family: times New Roman;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    }

    After increasing font size, the words in each line did not fit and were being entered on the line below the line they should be in. For example, instead of "University of Utah" on the third line, I had only "University of" and then on the line below "Utah Salt Lake City". So, I increased the margin size to accommodate the larger font. Here is my margin code:

    #primary {
    margin: 0 -36.4% 0 0;
    }
    #content {
    margin: 0 36.4% 0 3.6%;
    }
    #secondary {
    float: right;
    margin-right: 3.6%;
    width: 22%;
    }

    Now the problem is that the margins are too wide and the text from the line below is merging into the line above. Using my previous example, I now have "University of Utah Salt Lake" on the line that should only read "University of Utah". Playing with the margins only cuts off lines or makes them larger.

    Any suggestions for how to get four lines in the sidebar would be greatly appreciated.

    Many thanks,
    Kimberly

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    I think you'll suffer a lot less frustration if you add line break tags <br /> at the end of each of your lines in that Text widget.

  3. kssheldon
    Member
    Posted 2 years ago #

    Thank you! I searched the forum for this fix, but I was missing the magic search words: "line break". I figured it was an easy fix, but I couldn't find it anywhere. Thanks for taking the time to respond.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    No problem :-)

Topic Closed

This topic has been closed to new replies.

About this Topic