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

The Archive Base Latest Questions

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

I have a div #footer_container { position: fixed; width: 540px; height: 45px; margin-left: -270px

  • 0

I have a div

#footer_container {
  position: fixed;
  width: 540px;
  height: 45px;
  margin-left: -270px
}

And I would like the CSS left value to be left: 50% for Browser-widths >1000px and left: 500px for browser widths of <1000px

I know this can easily be done with media queries but they are problematic and dont work with IE8.

Can someone please do this with javascript? Thanks

  • 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:01:45+00:00Added an answer on May 26, 2026 at 11:01 am
    #footer_container {
        ...
        left: 500px;
    }
    @media all and (min-width: 1000px) {
        #footer_container {left: 50%;}
    }
    

    Works with CSS3-compatible browsers, updates automatically with no need for window.onresize or similar code… or indeed any code.

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

Sidebar

Related Questions

I have a div container with height:auto, this I assume would increase the height
I have a div with two nested divs inside, the (float:left) one is the
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
I have a div named footerWrap, which contains 3 unordered lists. I floated left,
I have a footer that has a fixed position at the bottom of the
The idea: I'm creating a div that will change to position:fixed once the top
How do i put a border on a div in css that doesn't have
i have a div that i use as a container to fit in footer
my site has three div elements, header, content and footer. i have a picture
I am having jQuery animation issues... I have a footer with a hidden 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.