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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:53:50+00:00 2026-05-27T12:53:50+00:00

I have a div with some standard width/height.. What css parametrs should i know,

  • 0

I have a div with some standard width/height..
What css parametrs should i know, to calculate how many letters the div fit with no overflow?
I think that the following parametrs are neccessery..

  1. font-size
  2. text-indext
  3. letter-spacing
  4. line-height

Then how can i calculate the max number of letters the div fit?

  • 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-27T12:53:51+00:00Added an answer on May 27, 2026 at 12:53 pm

    First let’s assume you have a fixed css on the divs:

    width
    height
    line-height
    font-size
    font-family
    etc.
    

    I would write some javascript to fill this div many times with different text (maybe pulled form actual articles) and do this in different browsers. Each time calculate the maximum number of characters that fill, but do not overflow the div. Then you have an upper bound on the number characters you need to send to always fill the div. Truncate each article in your slider to that number. You could add 10 characters if you want to ensure overflow and then use overflow hidden or ellipses or whatever.

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

Sidebar

Related Questions

We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on
I have a link which animates some div 's height when its hovered, but
I have a div with float:right (no position property declared). This div has some
I have a div with id=images. The div contains some images that are each
I have a div element containing some text. When the user clicks a word
I have a div (sub area of page with scroll bar) that has some
I have one aspx page with some controls. Also i have one DIV which
I have such div: <div class=box> <div id=myid style=display:hidden;> <p>some stuff here</p></div> </div> when
If I have a HTML form with some embedded div s, and after the
I have some HTML and jQuery that slides a div up and down to

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.