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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:54:40+00:00 2026-06-15T19:54:40+00:00

I am trying to make a lined paper effect for my personal blog, but

  • 0

I am trying to make a lined paper effect for my personal blog, but I have run into a snag getting each line to render on one of the actual lines on the paper. Everything starts out just right, but rounding errors seemed to accumulate as the lines go down the page. I had set the line height to 24px, and added padding to elements that was 24px, basically just trying to make sure any thing that added height was a multiple of 24 so that all the lines rendered correctly. But I found that chrome is not respecting the line height property exactly. Can anyone explain the screenshots below?

Here is basically the effect I am going for, as you can see it is pretty close.
Illustration of Desired Effect

But if you take a look at the height property, it is 70.909…, when it should actually be 72 (24 * 3). So Basically my question is, why is the height of the <p> [6char] not a multiple of the line height?

The height is not a multiple of line-height

Here is the CSS computed style for a <p> element in text:

font-size:16.363px;
height:70.909088;
line-height: 24px;
padding-top: 24px;
margin:0px;
padding-bottom:0px;
  • 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-15T19:54:41+00:00Added an answer on June 15, 2026 at 7:54 pm

    It’s because your browser is overriding the default text size. This is most likely due to your zoom level or any accessibility options you might have turned on.

    I created this (you can view it on jsFiddle):

    <html>
    <head>
    <style type="text/css">
    p {
        line-height: 24px;
    }
    </style>
    </head>
    <body>
    <p>
    three<br>
    lines<br>
    of text<br>
    </p>
    </body>
    </html>
    

    And the computed style in Chrome is:

    display: block;
    height: 72px;
    line-height: 24px;
    width: 1584px;
    

    Pressing crtl+- and reloading the page yields the following computed style:

    display: block;
    height: 70px;
    line-height: 23.981483459472656px;
    width: 1761.8148193359375px;
    

    The only way I can think of making a zoom-level agnostic lined paper theme would be to either render the paper yourself using Javascript and a canvas (or simply generating the image data based on line height) OR, adjusting the zoom-level yourself as detailed here:

    How to detect page zoom level in all modern browsers?

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

Sidebar

Related Questions

I'm trying to make a HTML file with command line, but there is one
in my application I am trying make a requst but i have received an
I am trying to make a line graph using the drawRect method but I
I'm trying to make the menu appear at the middle of 30px line but
I am trying to make a simple calculator. I am getting blue line under
I'm trying to make a simple line plot but I get the following error:
I'm trying make it work. And I have a lot of errors, but this
I'm trying to make an asterisk line up vertically with surrounding text/graphics rather than
I'm trying to make a level-of-detail line chart, where the user can zoom in/out
I'm trying to make a drawing app and currently working on the line tool

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.