Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 733359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:14:55+00:00 2026-05-14T07:14:55+00:00

OK, I have a list ( <ul> ) then inside each <li> element I

  • 0

OK, I have a list (<ul>) then inside each <li> element I have an <a...>

Here are all the applicable CSS items to the <a> tag

.search_area li a {
  font-size:11px;
}
sResCntr li {
  list-style-type:none;
}
body {
  font-family:Arial;
}

Everything looked great, until I put that font-size:11px in there. The problem is that the hyperlinks wrap to multiple lines within the list (which is fine). But when I decrease the font-size, the last line of the hyperlink always has a larger gap between it and the line above it than the other lines. All the other lines look good, but the last line looks like it is 1.5 spaced or something. I have adjusted the line-height property, but always the last line is larger than the rest.

If you need a demo to look at to see what I mean, I can arrange it when I get home.

here is some HTML:

<ul class="sResCntr">
  <li>
    <a id="blah" value="6048" href="blah blah"> This is some text that is really long.  In fact so long it goes to multiple lines.
    </a>
  </li>
  <li class="alt">
    <a id="blah 2" value="5946" href="blah blah"> some more super long text which will wrap to multiple lines.  In fact, hopefully, so long that it wraps to at least 3 lines in whatever container you put it
    </a>
  </li>
</ul

Of course, that has to be in a container which is fairly narrow (mine is 150px if I remember)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:14:55+00:00Added an answer on May 14, 2026 at 7:14 am

    That’s because of the line height. The line height is normally calculated based on all the characters on the line. The 1st line has the larger line height and the 2nd line has the smaller line height where it wraps. You might have to specify a fixed line height your link:

    .search_area li a {
      font-size:11px;
      line-height:14px; /* matching the other lines */
    }
    

    Alternatively you could put a character after your hyperlink so when it wraps the 2nd line will get the line height of the characters outside the hyperlink. Something like this:

    <li>Some Text <a href='#'>Your Link</a>&nbsp;</li>
    

    Edit from OP:
    This answer led me to try the following which worked perfectly:

    I added the following to my CSS:

    .search_area li
    {
        line-height:0px;
        padding:5px;
        background-color:#F3F3F3;
    }
    

    While there is no text in the li, outside of the hyperlink, the line-height of the li, was still messing me up. By getting rid of it, the hyperlink is allowed to determine the spacing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.