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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:11:46+00:00 2026-06-16T03:11:46+00:00

I’m working on a jquery plugin for my own datagrid. The problem I’m facing

  • 0

I’m working on a jquery plugin for my own datagrid. The problem I’m facing is a clipping of one div inside another div. I need the last div to fill the remaining space, and I would like to make it without js/jquery to calculate the height if possible. I don’t even need compatibility with IE or firefox, just chrome.

Here a demostration of the problem:
http://jsbin.com/ubiniy/1

As you can see, the scrollbar at the bottom is not visible. With 92% height it’s visible at some dimensions, but no others.

Thanks in advance.

  • 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-16T03:11:47+00:00Added an answer on June 16, 2026 at 3:11 am

    The problem is that it inherits parent’s height as you declared but there’s also 2 more divs for the titles so there’s no room for all since it’s over the 100% and it scrolls 🙂


    OK here’s an approach:

    However it needs to be sure that title divs are one line only or you end up with wrong calculation.

    If so you add this

        <div class="dlgrid" style="overflow: hidden;......height:700px;">
    
        <div class="title">Title</div>
        <div>Title 2</div>
        <div class="dlInnerDiv" style="overflow:auto;">....
    

    css:

    div.title{
      line-height:20px;
    }
    div.title + div{
      line-height:18px;
    }
    

    or

    div.title{
       height:20px;
    }
    div.title + div{
       height:18px;
    }
    

    In that case you have 700-20-18 = 662 or what ever heights you give to those
    so all is left is to:

    div.dlInnerDiv{
        max-height:662px;
     }
    

    Also you need to reset all unwanted margins and paddings like

    div.dlgrid,div.dlgrid div{
       margin:0; 
       padding:0;
    }
    

    or whatever value you want but take it in consideration when summing the height above because the vertical of these have influence on it in each of the elements participating.

    I hope I’ve understood and this is what you’re after http://jsbin.com/ubiniy/23 🙂

    Keep in mind that this resolves only that particular issue and you might and up with undesired behavior so I do not recommend any approach like this of fixing height in dynamic content and depending on a specific case of circumstances.

    My advice is to have a look how other people have solved this issue making grids or whaever there’s no need to find the hot water all over again 🙂

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The
I need a function that will clean a strings' special characters. I do NOT

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.