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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:44:26+00:00 2026-05-15T11:44:26+00:00

Size element so it is exactly as tall as it needs to be to

  • 0

Size element so it is exactly as tall as it needs to be to not scroll
I am working on a tool to allow creating small “notes” that I then turn into Ext.Draggable items. What I would like to do is to have these items be sized no taller than they need to be.

The elements are absolutely positioned: set position: absolute with top and left and height and width values in-line. The problem is that the height values are not really very reliable.

Is it possible to set the size at something very short (say 3px), then increment the height until the scrollbars disappear? How can I tell when that occurs, and can I do it in a way that’s reliable across browsers?

Code: http://github.com/artlung/ArtLung-Notes/blob/master/v2/index.js

  • 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-15T11:44:26+00:00Added an answer on May 15, 2026 at 11:44 am

    In general, see Ext.util.TextMetrics.getHeight(). Note that you can’t use the singleton for height determination.

    However, I think that removing explicit height should generally solve your problem. That’s unless you need to synchronize something like shadow overlay’s size, though.

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

Sidebar

Related Questions

The size of the generated hash and the speed of the algorithm are not
We run a medium-size site that gets a few hundred thousand pageviews a day.
With HTML/CSS, how can I make an element that has a width and/or height
I have the following code: <div id=elm0 data-color=color data-size=size data-more=more>something</div> <div id=elm1>This element must
I have a small mobile phone app that is acting strangely on the iPhone/Mobile
Why does an html element (such as a div) that has been styled with
I wrote an implementation of vector, which compiles but is not working properly according
boost::pool<> constructor takes element size parameter. boost::object_pool constructor takes initial # of element parameter.
The size and range of the integer value types in C++ are platform specific.
How to find out size of session in ASP.NET from web application?

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.