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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:54:33+00:00 2026-05-27T07:54:33+00:00

I have the following: <span id=span_1 style=overflow: auto;> <span id=span_2 style=font-size: 200px; background-color: red;>Testing</span>

  • 0

I have the following:

<span id="span_1" style="overflow: auto;">
<span id="span_2" style="font-size: 200px; background-color: red;">Testing</span>
</span>

When I try to get the height of the wrapping span span_1 using jQuery – it gives me 19px. Even though the inner span span_2 has a font-size of 200px and its computed height on firebug is 225px.

Why is the wrapping span not fully wrapping around the inner span?

I am basically trying to find the exact remaining height of a particular element. This element can have many children but I want to know how much height it has left. So the idea is to wrap everything within that element in a span and calculate height using jQuery but so far I don’t understand why the above doesn’t work.

Better ideas? I can’t wrap a div around the contents as it will be effected by line-height.

  • 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-27T07:54:34+00:00Added an answer on May 27, 2026 at 7:54 am

    Try adding display: inline-block; to the parent span.

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

Sidebar

Related Questions

Say I have the following code: <span>Hello world!</span> And the following CSS: span{ color:red;
I have something like the following code: <div style=border:2px black solid;overflow:hidden;> <span style=float:right;> <img
i have the following code <div class=hitarea expandable-hitarea></div> <span class=folder>level 1</span> <ul style=display: none;>
<html> <head> <title>Coupon test code</title> <style> #error{ color: red; font-weight: bold; } </style> </head>
I have the following HTML code <div id=id0_0 class=clearfix style=margin-left:40px> <div id=id0_1 class=choice> <span
I have the following html: <label wicket:id=drugSearchResult.row.item.label for=drug_1>[Drug XYZ] <span wicket:id=drugSearchResult.row.item.info>[Information, Price, Other]</span> </label>
I have the following structure. <ul id=browser class=filetree> <li><span class=folder>Folder 1</span> <ul> <li><span class=file>Item
I have the following: $(span.findme).each(function() { $(<li>).text($(this).text()).appendTo(ul); }); How can I, using the above,
I have the following code which should be getting the text from a span
I have the following HTML: <span id=UnitCost5>$3,079.95 to $3,479.95</span> And i want to use

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.