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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:50:10+00:00 2026-06-06T06:50:10+00:00

I have a site with absolute positioned elements on it, for example the top

  • 0

I have a site with absolute positioned elements on it, for example the top Navigation of the site:

#topNav
{
  position:     absolute;
  top:          100px;
  left:         50%;
  height:       40px;
  width:        1000px;
  margin-left:  -500px;
}

Now I created a sticky footer like on the following site:
http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

Now, the problem is that the footer will “overlap” the topNav,
because the topNav is positioned absolute, which means it’s “outside of the normal float of elements”. The relative position will not “notice” that there is the topNav before.

Before I start creating additional “pusher divs” for each absolute positioned element I would better ask if there are better practices than “pusher divs” or should I even not use position absolute on my elements?

EDIT:
JsFiddle here: http://jsfiddle.net/dkxUX/15/

When you scale down your browserwindow you’ll find #footer overlapping all elements before it.

  • 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-06T06:50:12+00:00Added an answer on June 6, 2026 at 6:50 am

    You could just apply a 140px top margin/padding to the body or other container element which would make the topNav’s height and offset accounted for.

    Better yet, don’t set position to absolute in this case – it appears to me that all you’re doing is horizontally centering a 1000px wide div.

    /*top-margin of 100px + center the element*/
    #topNav {width:1000px; height:40px; margin:100px auto 0;}
    

    Update: I see your jsfiddle now. You could account for all absolutely positioned elements when setting the margin/padding as suggested in the first paragraph You are using absolutely positioned elements when normal document flow could be relied on.

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

Sidebar

Related Questions

I have three images on my site which are absolute positioned. When I zoom
I have a quickly put together site for a friend showing them absolute positioned
I'd like to have my navigation menu on my site span the width evenly.
For example I have site http://localhost/site In IIS I set that 404 error causes
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
i have always wondered how to limit the area a element with position absolute
I have a text input with a search buton absolute positioned over it... to
I am using a div with class scroll-pane (height 100%) within an absolute positioned
I have a simple navigation bar at the top of the page with several
I have a div that is positioned:absolute, this div extends outside the bounds of

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.