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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:55:34+00:00 2026-06-08T19:55:34+00:00

The following code has a DIV that needs to be positioned at the top

  • 0

The following code has a DIV that needs to be positioned at the top of the container, another at the bottom and then the content needs to come through in the middle.

<div style="position:absolute; top:0; width:100%; height:40px"></div>

<div class="howto"></div>

<div style="position:absolute; bottom:0; width:100%; height:40px"></div>

So we don’t know the height of the containing DIV. How without JS can the div with class howto have the height of the container DIV less the height of the absolute positioned div at the top and bottom so as to contain content between these 2 DIVs.

  • 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-08T19:55:35+00:00Added an answer on June 8, 2026 at 7:55 pm

    For what you wish to accomplish, this is one possible solution:

    @tinkerbin: http://tinkerbin.com/QsaCPgR6

    HTML:

    <div class="container">
        <div class="header"></div>
    
        <div class="howto">
          Has height set to auto. You may change that if you want to.
        </div>
    
        <div class="footer"></div>
    </div>
    

    CSS:

    .container {
      position: relative;
      padding: 40px 0; /* top and bottom padding = .header and .footer padding*/
    }
    
    .header,
    .footer {
      position: absolute;
      height: 40px;
      width: 100%;
    }
    
    .header {
      top: 0;
    }
    
    .footer {
      bottom: 0;
    }
    
    .howto {
      height: /*specifiy one if you wish to*/;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Gday All, The following code displays a div based on the option that has
I have the following code that has @item.ID from razor: <a href=# id=deleteitem(@item.ID)>Delete</a> When
Class 1 has the following code that generates the exception - -(IBAction) searchAllAction: (id)
The following code tries to attach to an excel session that has the C:\test
I have a .svg file that has the following code: <svg version=1.1 x=0 y=0
The following code has concurrency issues. Here inDegVec is a global int * ,
So I'm trying to play a video and the following code has worked for
I am generating a simple form with php. The following code has been reduced
I have tried the following code but has no effect: Imports system.Runtime.InteropServices <DllImport(UxTheme.DLL, BestFitMapping:=False,
The documentation has the following code var options = { host: 'www.google.com', port: 80,

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.