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

  • SEARCH
  • Home
  • 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 8272875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:16:43+00:00 2026-06-08T07:16:43+00:00

Here is the pretty short fiddle which includes a 20px by 20px ruler. I

  • 0

Here is the pretty short fiddle which includes a 20px by 20px “ruler”. I expect my p tag to be 20px high…10px text, and 10 px for the top and bottom padding (5px + 5px).

However it looks to be about 22px.

http://jsfiddle.net/BNnhp/30/

I have reset the body tag, the p tag and the div tag using margin 0px, padding 0px and line-height 100%.

Previously I had as a similar issue that was fixed by setting line-height to 100%….however this is not working here?

I want to know the exact cause – CSS attribute and value.

But for testing purposes I clicked the normalize box in jsfiddle and this had no effect either.

Added in more resets here:

http://jsfiddle.net/BNnhp/32/

  • 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-06-08T07:16:44+00:00Added an answer on June 8, 2026 at 7:16 am

    I created a small test case, but it worked fine there. So, I went back to your answer, and found you were setting p‘s display value to inline, which was causing the 2px – 3px difference (fixed version). To fix, change your CSS as follows (look at comments):

    /* ... */
    #hold_name{
      padding: 5px 5px 5px 5px;
      /* position:relative; -- Don't need */
      /* top: 0px; -- Don't need */
      color:#000000;
      /* display:inline; -- Don't need */
      background: #ffffff;
      font-size: 10px;
      margin:0; /* Need to add */
      line-height:100%;
    }
    #hold_name:hover{
    }
    #wrap{    
      position: absolute;
      top: 20px; /* Change to 20px from 24px */
      visibility: hidden;
      margin: 0;
      padding: 0;
      border-left: 1px solid #007fa5;
      border-bottom: 1px solid #007fa5;
      border-right: 1px solid #007fa5;
    }
    /* ... */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty short question, here is an example: $prepared = $this->pdo->prepare(SELECT * FROM Users WHERE
Here is a pretty theoretical and abstract question: How Service-oriented architecture (SOA) differs from
Well, I'm gonna be pretty straightforward here, I just have a piece of code
Pretty basic stuff here, trying to pull the number 14.5 out of this string
This is pretty standard stuff here, and I cannot understand why it isn't working.
I'm pretty sure I'm missing something very elementary here as I'm normally ok with
Here is my problem. I have created a pretty heavy readonly class making many
It's pretty difficult to show code for ASP.NET here, so I will try my
Here is the code, it's pretty straightforward. class Foo { public: void print() {
I'm pretty sure there is a very simple solution here but I can't seem

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.