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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:06:58+00:00 2026-05-26T11:06:58+00:00

I have a design where there is a header set at absolute position with

  • 0

I have a design where there is a header set at absolute position with a height of 379px. My content is also set at absolute position with top:232px as well. I am successfully getting the content div to stretch to the bottom of the page, however, because of the extra 232px even if the content does not pass the height of the window a vertical scroll bar is added.

I’ve looked around and have come across this topic posted which pretty much is the issue I’m having. Unfortunately, none of the solutions posted on that page have solved my problem. Here is my CSS code:

 #wrapper   { position:absolute; top:0; left:50%; width:1000px; height:100%; margin-left:-500px; }
 #header    { z-index:1; position:absolute; top:0px; background:url(../images/layout/backdrop.png) no-repeat; width:1000px; height:379px; }
 #container {
      position:relative;
      top:232px;
      bottom:0;
      background-color:#d7d7d7;
      width:739px;
      height:100%;
      min-height:100%;
      margin-left:175px;
      border:1px solid #000;
      border-bottom:0;
      border-top-right-radius:20px;
      -moz-border-radius-topright:20px;
}

And the HTML Code:

 <div id="wrapper">
      <div id="header"></div>
      <div id="container">

      </div>
 </div>
  • 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-26T11:06:59+00:00Added an answer on May 26, 2026 at 11:06 am

    Seeing that nobody has been able to answer this, i’ll post my solution to the problem.

    Although I didn’t exactly achieve it the way I wanted to which was to use strictly CSS, I still got it to stretch to the bottom using javascript with jQuery’s library.

    <script type="text/javascript">
    //<![CDATA[
        /*
            Method calculates container height and stretches to bottom of page
            if content does not fill entire space.
        */
        function setHeight() {
            // Get css values needed to compute height.
            var topAttr = parseInt($('#container').css('top'), 10); // convert value to int...
            var winHeight = $(window).height(); // get user's browser height...
            var conHeight = $('#container').height(); // get container height...
    
            // If the size of the container is less than the size of the user's window... resize.
            if(conHeight < winHeight) {
                var newHeight = (winHeight - topAttr) - 1; // calculate the new height....
                $('#container').height(newHeight); // apply the height value to the container.
            }
        }
    
        // Run as soon as page loads...
        $(document).ready(function(){
            setHeight();
        });
    // ]]>
    

    I then, added a noscript block at the bottom of the text that appears in a red box asking the user to enable javascrpt…

    <!-- DISPLAY IF USER HAS JAVA DISABLED -->
    <noscript><div class="nojava">
        It has been detected that you have disabled javascript from running. Please consider enabling javascript in that it will improve this website's functionality substantially.
    </div></noscript>
    <!-- DISPLAY IF USER HAS JAVA DISABLED -->
    

    I’m sure there is someone out there that can

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

Sidebar

Related Questions

There are 3 parts to the page. Header, which has unknown content at design
Since there is no finally in C++ you have to use the RAII design
Is there any plugins for Eclipse for portlet design and deployment? I have never
Is there any name for the following DB table design: Basically we have generic
For you database design/performance gurus out there. If you have a database that is
I am trying to design header only library, which unfortunately needs to have global
I have a design issue that I would appreciate some input on. I would
I have started design of a ColdFusion application that is entirely web based. Not
I have to design a data structure that is to be used in a
I have this design which I cannot seem to get right, I would like

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.