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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:16:13+00:00 2026-05-23T06:16:13+00:00

Whenever i use a large line-height like 1.6em it always adds a margin in

  • 0

Whenever i use a large line-height like 1.6em it always adds a margin in the very top of the text which i don’t want.

Example: http://jsfiddle.net/EstpJ/1/

i want the text to be sharply lined with the borders and not have any kind of top or bottom margin.

How to fix that?

  • 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-23T06:16:14+00:00Added an answer on May 23, 2026 at 6:16 am

    That’s exactly what line-height is, it’s a manual way to set the height of a line of text for the purposes of wrapping text and such. The actual visible size is determined by the font-size and to a lesser extend by the font-family. The average line-height for normal text/font is around 1.2em. Anything larger than that will cause visible letterboxing, which is exactly what you are describing. Using a smaller value will cause successive lines to overlap each other.

    The only way to fix your exact example is introduce more markup to determine line numbers so that you can style the first/last line differently.

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

Sidebar

Related Questions

It seems like whenever I use the Command Pattern, it always leads to a
Whenever I use Html.ActionLink it always Html encodes my display string. For instance I
Whenever I use WCF, I always try to make immutable classes that end up
I am plannning to use whenever gem which among other things will also run
We use hg to control the sources for a large project. Whenever we do
Whenever I use the signal/slot editor dialog box, I have to choose from the
Whenever I use a macro in Visual Studio I get an annoying tip balloon
Whenever I use the rand function in C++: #include<iostream> #include<time.h> #include<stdlib.h> using namespace std;
Whenever I use the Eclipse source code formatter / beautifier (via the menu item
Whenever I use the following code, the webserver (running IIS 7) refuses to send

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.