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 7081601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:56:28+00:00 2026-05-28T06:56:28+00:00

This is difficult for me to put right but let me try. I have

  • 0

This is difficult for me to put right but let me try.

I have horizontal ul li a menu:

Please note that I have omitted some CSS that keep it simple

<ul>
    <li class='featuring'><a href='#'>Whatever</a></li>
    <li class='empty-item'></li>
    <li><a href='#'>Item1</a></li>
    <li><a href='#'>Item2</a></li>
    ...
</ul> 

ul li a{
    line-height: 2.4em;
    font-size: 1.1em;
    ...
}
ul li.empty-item{
    border-top: 1.7em solid white;
    border-bottom: 1.7em solid white;
    border-left: 1em solid #240B3B;
}

Above code gives this:
nav-menu

Which is great except I wanna change that kindle font-size so I add:

ul li.featuring a{
    font-size: 1.4em;
    ...
}

And unwanted distortion appears:

nav-menu2

I suppose that I don’t understand line-height property well enough? I though that after changing ul li.featuring a font size container size would stay same and only font size inside target element would change but instead element’s height scales while leaving rest of the menu items in same proportion and out of sync.
What I thought is that line-height(3.4em) and font-size(1.4em) difference(2em) is cut in half and distributed evenly which would mean that no container height would change???

Hope it is clear.

Thank you.

  • 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-28T06:56:29+00:00Added an answer on May 28, 2026 at 6:56 am

    I was certain you’d have an answer by now, but since no one’s jumping all over this I’ll give it a shot.

    It’s not so much an issue with line-height as it is an issue with relative VS absolute units of measurement.

    em is a relative unit of measurement, based on the font size. When you increase the font size, you increase all the property values that are measured in em, such as your line-height here.

    • Original: http://jsfiddle.net/MWuHL/
    • With your added CSS (shows the extra space): http://jsfiddle.net/MWuHL/1/

    Using an absolute unit like px will not change based on font size:

    • With your added CSS, but measuring line-height in px: http://jsfiddle.net/MWuHL/2/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried searching for this but it's pretty difficult to put into words. Basically,
I'm not sure how difficult this but I have an array and would like
This is something that should be easy to answer, but is more difficult for
This is a difficult problem to describe so please let me know if anything
This is a difficult and open-ended question I know, but I thought I'd throw
This might be a bit difficult to explain in writing, so please bear with
This seems like a simple question, but it is difficult to search for. I
I have a css horizontal menu with a menu / submenu display working on
Difficult to put down in words, so assuming this example table: | id |
I used to put everything in packages like this: com.company.app.module1 com.company.app.module2 But it has

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.