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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:21:55+00:00 2026-05-25T03:21:55+00:00

I need to count text height in html block. So i will know is

  • 0

I need to count text height in html block. So i will know is this block overflows screen or not (for example). All i have is just html code taken from database. Of course it can or can’t have br’s, p’s or div’s, so counting it is not a good idea. Also the styles can change their attributes. I need to do this on server side on PHP.
Anyone has do this already?

The solution can be in 10% not accurate – its OK.

Thank you,
Sergey

  • 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-25T03:21:55+00:00Added an answer on May 25, 2026 at 3:21 am

    You can’t answer that in abstract: web sites are not still pictures, they are complex documents designed to be displayed inside very different kind of devices.

    You might be able to find an answer if you pick a concrete scenario: a given HTML+CSS rendering engine plus a certain set of configuration options (available fonts, font renderer settings, viewport size and resolution…). That is to say, you basically have to send the document to an browser and either grab a screenshot and analyse it yourself or make the browser send you back the information.

    There are HTML engines designed for off-screen rendering: I can think of wkhtmltopdf, which is a tool to convert HTML to PDF using webkit. The question is whether you actually need one.

    IMHO, your best chance is to send your document to a real desktop browser and write some JavaScript code to gather and send back the information.

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

Sidebar

Related Questions

I have a a large text file (over 70mb) and need to count the
Simply I need to write echo t${count} = $t${count} To a text file, including
I need to count number of repeating and position where they repeat of all
I need to get a get a count of all the distinct subnets in
I need to count the number of text inputs with a value of 1.
I know this will sound odd but stay with me on this. I am
I need some help to get this to work. It works, but i have
I'm writing a script that will fold, sort and count text in a file.
I need to read a large space-seperated text file and count the number of
I have a simple html text box. When I submit the form that the

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.