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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:58:28+00:00 2026-05-23T07:58:28+00:00

Just checking to see whether there’s a way to do this in CSS before

  • 0

Just checking to see whether there’s a way to do this in CSS before I get my Javascript on!

In the example, the #fixed div gets filled with content dynamically – so we never know how big the content in that div will be.

The beginning of the #absolute div must always be rendered underneath the #fixed div. The #absolute div also gets filled with lengthy content dynamically, so the user must be able to scroll the content in that div, no matter how big it gets.

Without knowing the size of the #fixed div, is there a way using only CSS that we can keep the beginning of the #absolute div underneath the #fixed div?

XHTML:

<div id="right">
    <p>This div is just here to force a scrollbar.</p>
</div>

<div id="fixed">

    <p>This div gets filled dynamically with content of varying length</p>

</div>

<div id="absolute">

    <p>This div also gets filled dynamically with content of varying length,
    and needs to stay underneath the div above.</p>

    <p>This div will sometimes get so high that it stretches below the bottom of the page,
    and because it's inside a fixed positioned div the user won't be able to read all of its content.</p>

</div>  

CSS:

#fixed {
    position:fixed;
    border:2px solid green;
    width:200px;
    display:block;
    background-color:white;
}

#absolute {
    position:absolute;
    border:2px solid red;
    width:200px;
    margin-top:90px;
    z-index:-1;
}

#right {
    position:absolute;
    right:0px;
    width:200px;
    height:4000px;
    border:2px solid blue;
}
  • 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-23T07:58:29+00:00Added an answer on May 23, 2026 at 7:58 am

    Without knowing the size of the #fixed
    div, is there a way using only CSS
    that we can keep the beginning of the #absolute div underneath the #fixed div?

    No. CSS cannot help you here.

    The absolute/fixed elements are …

    removed from the normal flow entirely
    ([and have] no impact on later siblings).

    and:

    the contents of an absolutely
    positioned element do not flow around
    any other boxes

    http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning

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

Sidebar

Related Questions

Just checking if there's any best practice when writing a Windows Service. The Service
I am just checking out F#, so apologies if this is a silly question,
I've just found out about Stack Overflow and I'm just checking if there are
I just went through some MVC tutorials after checking this site out for a
Is there a way to see if a field exists in an IDataReader-based object
I was just wondering how would I go about checking to see if, for
Another newbie question from me. Just checking whether my code below is possible. I.e
I was just checking to see if it was valid to put an <iframe>
I did some checking over my site today to see whether it was Cross
i just checking Flash Builder 4 ( i come from Flex builder 3 ),

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.