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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:03:17+00:00 2026-05-27T05:03:17+00:00

Possible Duplicate: How can I measure how many characters will fit the width of

  • 0

Possible Duplicate:
How can I measure how many characters will fit the width of the document?

I’m developing a mobile website and I’ve run into a problem. The site gets the mobile device’s screen size and needs to calculate how many characters it can fit on the screen. Once this information is known, a string of that length will be pulled from the server using AJAX.

The problem is, I am not sure how I can perform this calculation using JavaScript. Does anybody know how I can solve this problem?

  • 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-27T05:03:18+00:00Added an answer on May 27, 2026 at 5:03 am

    the problem is “How can i calculate characters(symbols) length with JavaScript on the assumption of mobile device screen size?”

    Unless you use a fixed-width font, you can’t. Not without knowing the text’s contents in advance. That’s because in every normal font, every character (and sometimes, even every character pair) has a different width.

    Maybe elaborate some more about your requirement. I’m fairly sure there is a much simpler solution for what you need to do.

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

Sidebar

Related Questions

Possible Duplicate: How can I measure the similarity between two images? how to check
Possible Duplicate: fast elapsed time on linux How can I measure how long a
Possible Duplicate: Can I run a .NET garbage collection from WinDbg? I'm debugging a
Possible Duplicate: Can't pass mysqli connection in session in php Many of us have
Possible Duplicate: Can we run Java applictions on iPhone? Does IPhone4 supports Java? Can
Possible Duplicate: Can C# apps run without the .NET framework? How can I convert
Possible Duplicate: Can I skip the commit message step when I run git commit
Possible Duplicate: Can every recursion be converted into iteration? Are there problems in which
Possible Duplicate: How to measure time in milliseconds using ANSI C? How can I
Possible Duplicate: Can I find the console width with Java? For example, when you

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.