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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:11:28+00:00 2026-06-16T23:11:28+00:00

I cant seem to be able to center #testmenu no matter what… I’ve tried

  • 0

I cant seem to be able to center #testmenu no matter what… I’ve tried dozens of combinations in CSS but without luck. Please take a minute to have a look and save my hair from being completely pulled out.

#abc {
    position:absolute; 
  bottom: 0;
    width:100%;
    left:0;
    text-align:center; /* IE 5.x centering */
}

#testmenu {
    line-height:2em;
    width:960px;
    color:#FFF;
    background:#00F;
  background:#C00;
    margin:0 auto;
}

<div id="abc">
    <div id="testmenu">
        This should remain 'fixed' bottom center.
    </div>
</div>

Here’s a simple jsfiddle of what I’m after: http://jsfiddle.net/mXTmF and also working demo of the page: http://ht-webcreations.com/vildiridis/index.php

  • 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-16T23:11:30+00:00Added an answer on June 16, 2026 at 11:11 pm

    The problem is that you can’t apply auto margins to a fixed element. To allow for varying menu widths, I’d do this:

    #abc {
        bottom: 0;
        height: 30px; /* forces #testmenu to the bottom */
        margin: 0 auto;
        position: fixed;
        width: 100%;
    }
    #testmenu {
        background: none repeat scroll 0 0 #FF0000;
        bottom: 0;
        font-size: 10px;
        height: 30px;
        overflow: hidden; /* prevents extra space underneath from 33px-high menu items */
        margin: 0 auto;
        max-width: 1000px;
        width: 960px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I think my head is being dense. But I cant seem to get
I cant seem to be able to build a good regex expression (in javascript)
I cant seem to find the right code to be able to draw a
I been reading about getElmentByClassName but I cant seem to get it work in
Apologies I know this is a well covered question, but I cant seem to
I have looked over the pages on the site, but cant seem to find
I cant seem to be able to split on a simple regex, If i
I am quite new to Python and I cant seem to be able to
I'm relatively new to PHP OOP and cant seem to be able to call
I have seen quite a few questions about this but cant seem to find

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.