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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:00:09+00:00 2026-05-20T02:00:09+00:00

I have two divs with width 100%. I want one to always be on

  • 0

I have two divs with width 100%. I want one to always be on top of all content, and I want the second to be always on the bottom of everything. How can I do this? Preferably in pure CSS but I’ll try jQuery/JS solutions if I need to.

I tried adding the header using include(“header.php”); and header.php contains just the HTML code of the header. However, it doesn’t work, but putting that exact code in place of the include works fine. How can I fix this?

  • 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-20T02:00:10+00:00Added an answer on May 20, 2026 at 2:00 am

    You can start with position:fixed and defining either top and left properties or bottom and left properties.

    Check out CSS sticky footer while you’re at it (deprecated link).


    A new sticky positioning has been introduced in CSS. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed until it reaches the boundary of its parent. Using fixed and sticky positioning you can implement headers and footers that are always on top of everything else.

    Sticky positioning might not be available to all browser versions that the end-user might use. For achieving sticky footers in older browsers do check How to make a sticky footer using CSS?

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

Sidebar

Related Questions

I have two divs one inside of the other, now i want to put
I have this problem, I have two divs: <div style=width:100%; height:50px; id=div1></div> <div style=width:100%;
i have two divs with the same ids but one has display=none and the
I have a div with two nested divs inside, the (float:left) one is the
i have two divs one floated to the left and the other to the
I have a container div that holds two internal divs; both should take 100%
I'm trying to get two Divs to sit side by side. I want one
I have two divs, overlay and results, with z-indexes of 100 and 200 respectively.
I have two divs, one on the left, and one on the right side
I have two divs inside a wrapper div of width 880px. The first div

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.