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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:52:28+00:00 2026-05-13T12:52:28+00:00

I am writing a jQuery plugin which makes use of two nested <DIV> elements.

  • 0

I am writing a jQuery plugin which makes use of two nested <DIV> elements.

The outer div has a fixed width with overflow:scroll and the inner div (which is much wider) contains the content which I want to scroll around.

This all works fine apart from the fact that I want to use some JavaScript (with jQuery) to set the height of the inner div to exactly match the height of the outer div, less the height of the horizontal scroll bar.

At the moment I’m setting it to the height of the outer div, less about 20 pixels. This sort of works, but it’s not going to be browser independent and is definately a hack!

Any help would be very much appreciated!

  • 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-13T12:52:28+00:00Added an answer on May 13, 2026 at 12:52 pm

    You need to use element.clientHeight. In jQuery that would be something like:

    var heightWithoutScrollbar = $('#outer')[0].clientHeight;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm writing a new jquery plugin which accepts among others two parameters. the first
I'm writing a jQuery plugin , which similar to this, $(this).each(function(){ $el = $(this).find('.el')
I am writing a jQuery plugin to simulate an editable div. Here is my
I am writing a bookmarklet in which I want to use the jquery forms
I am writing a jquery plugin which can be activated on an text input.
I've got a rather large plugin that I am currently writing in jQuery which
I'm writing a jQuery plugin where the events which start/stop the plugin are customisable,
I'm writing a jQuery plugin for work which pulls in RSS feed data using
I'm writing a jQuery plugin which introduces a new method foo() , which creates
Im using a jQuery plugin and separately im writing my own jQuery which is

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.