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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:38:16+00:00 2026-06-04T10:38:16+00:00

Ok, so I have a very simple stack: ——— | A | ——— |

  • 0

Ok, so I have a very simple stack:

---------
|   A   |
---------
|   B   |
---------
|   C   |
---------

Both A and C have known and fixed heights. Yet the window height (a mobile viewport) is unknown. I’m trying to get B as tall as possible. I’m going to use overflow-y: auto, so overflowing is not an issue. The actual issue is expanding it to an unknow (but calculable) value.

I have solved this by calculating $(window).height() - ($(A).height + $(C).height()), but there must be a better way (or a jQuery plugin).

  • 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-06-04T10:38:18+00:00Added an answer on June 4, 2026 at 10:38 am

    Make sure that the container has a non-static positioning, then make B position: absolute; and set both top and bottom to the heights of A and C, respectively.

    For example, if A were 20 pixels tall and C 40, your CSS for B would look something like this:

    #b {
        bottom: 40px; /* Height of C */
        left: 0;
        position: absolute;
        right: 0;
        top: 20px; /* Height of A */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very simple window where I have 2 buttons - one for cancel,
I have a very simple webforms app that will allow field techs to order
I have some very simple XML: <properties> <property> <name>BobFish</name> <explaination>Bob is a fish.</explaination> </property>
I have a very simple Setup project that copies three dlls into the GAC.
I have a very simple table with two columns, but has 4.5M rows. CREATE
I have a very simple iPhone app that requires a random integer from 1-100.
I have a very simple Mac Cocoa app that just has a Web View
I have a very simple python script that should scan a text file, which
I have a very simple linq to sql query in C#: int acctNum =
I have two very simple, identical UITableViews in my app that are populated with

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.