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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:49:44+00:00 2026-05-28T05:49:44+00:00

The intent of this script is to make a DIV that is 100% of

  • 0

The intent of this script is to make a DIV that is 100% of the page height minus the top section.

Here’s the page:

http://nerdi.net/playground/kev/indexNEW.html

Here it is stripped down on jsFiddle, where it appears to be working.

http://jsfiddle.net/JVKbR/94/

For me, (on Chrome and FF) the scrollable div (.mid-col-main) only becomes scrollable upon resizing the window (Maximize, drag from corner, etc)

Any idea what I’m doing wrong?

EDIT: Jasper and Davin’s solution both work. Thank you.

  • 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-28T05:49:45+00:00Added an answer on May 28, 2026 at 5:49 am

    You need to wait for the DOM to be ready, basically you were running the code too soon and div.mid-col-main is not available yet:

    $(function () {
        var midColTopHeight = $("div.mid-col-top").height(),
            $window         = $(window),
            $midColMain     = $('div.mid-col-main');
        $window.resize(function(){
            $midColMain.height(($window.height() - midColTopHeight));
        }).trigger('resize');
    });
    

    Here I have placed your binding code inside a document.ready event handler and also triggered a resize event on the window element. I also optimized your code a bit to cache things that don’t change (you don’t need to select the same element every resize event).

    Instead of running this code in a document.ready event handler, you could put this code at the end of the HTML document (just before the closing </body> tag), that way the element you want to target will be available.

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

Sidebar

Related Questions

Basically I have a div at the very top of my site that I
I wrote a powershell script that connects to a remote machine with the intent
Here's my powershell script; I think the intent is pretty obvious: import-csv .\CdmCodeList.csv |
I need help getting VIM to correctly indent javascript inside script tags. This is
Intent intent=new Intent(this,Game.class); intent.putExtra(razmer, level); startActivity(intent); method startActivity() call constuctor class.This method creat object
public void openOptions() { Intent intent=new Intent(this,Game.class); //intent.putExtra(razmer, level); startActivity(intent); // Intent intent=new Intent(this,Options.class);
private void setFPAlarm() { Intent intent = new Intent(this, FPService.class); PendingIntent pi = PendingIntent.getService(this,
For example Intent intent = new Intent(this, SecondActivity.class); eclipse error: The method setClass(Context, Class)
I have the following code: Intent serviceIntent = new Intent(this, ServiceClass.class); startService(serviceIntent); I have
i filter the intent like this <intent-filter> <action android:name=android.nfc.action.NDEF_DISCOVERED/> <category android:name=android.intent.category.DEFAULT/> <data android:mimeType=text/plain />

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.