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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:49:38+00:00 2026-05-25T01:49:38+00:00

i have a DIV with dynamic content and resize function. Here is an example

  • 0

i have a DIV with dynamic content and resize function.
Here is an example -> http://jsfiddle.net/UsRuh/4/

The problem is the dynamic content.
Example -> http://jsfiddle.net/UsRuh/5/

It will only work when i set the padding from the #main DIV higher.
Example -> http://jsfiddle.net/UsRuh/6/

Is it possible (only with CSS, no JS!) to resolve this problem?

CSS

#header {
    background-color:#faf; }

#main {
    position: absolute; top: 18px; left: 18px; width: 384px; height: 157px;
    padding:0px 0px 80px 0px;
    position: absolute;
    overflow:hidden;}

#scrollDiv {
    background-color:#ccaacc;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 25px;
    width: 100%; }

HTML

<div id="main">

    <div id="header">Head</div>

    <div style="background-color:#555;"> some dynamic content text text text text <br /> some dynamic content</div>

    <div id="scrollDiv"> some dynamic content width "invisible" scroll<br />text text text text text text text text text text text text text text text text text text text text text text text text text text text text .... ext text </div>

    <div style="background-color:#555;"> some dynamic content text text text text <br /> some dynamic content</div>

</div>

EDIT:
If no other solution exists, please tell me.

  • 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-25T01:49:38+00:00Added an answer on May 25, 2026 at 1:49 am

    There are no CSS-only crossbrowser solutions available.

    The only way to achieve it now — to use extra wrappers and display:table + display:table-raw, so it would look like that: http://jsfiddle.net/kizu/UsRuh/28/

    The problem still: IE. IE6 and IE7 won’t understand table values of the display property.

    So there are only two possible ways to overcome IE:

    • use expressions (but it’s the same as the use of JS)
    • use unsemantic table instead of divs, so it would work everywhere.

    That’s really a big problem and table layout was the only posible solution for a long time. However, in the future (and now in webkit and firefox) we can try to use the flexible box model.

    With flexible box model it’s realy easy to achieve what you want only with CSS: http://jsfiddle.net/kizu/UsRuh/29/

    And that’s why the flexible box model appeared. Too sad, it’s availability is still not perfect.

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

Sidebar

Related Questions

i have a div with height:100px and overflow:auto the content is dynamic. i want
Here's the scenario: I have an asp.net webpage which displays dynamic data in a
Can jquery-ajax reload a div WITH DYNAMIC CONTENTS. For example if i have a
Hi all I have a problem with anchors and dynamic content loaded thought $.ajax().
I have a custom built ajax [div] based dynamic dropdown. I have an [input]
I am loading some text dynamically into a div, but have the problem that
I get dynamic content with Ajax and i put it in a div, but
Embedded custom-tag in dynamic content (nested tag) not rendering. I have a page that
I have a setup lets say like follows: <div id=nav> <div id=innernav> //With dynamic
I have a div#content with many div.item inside it. When using :last-child to make

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.