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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:51:19+00:00 2026-05-22T16:51:19+00:00

Demo Page: http://apps.pc-tips.in/play/ In the above, the div containing Ask any question & get

  • 0

Demo Page: http://apps.pc-tips.in/play/

In the above, the div containing “Ask any question & get” is centered, but the div containg the line “answers on” is not. why? Both have been styled similarly. given width, absolute position, margin auto.

The code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
div {
    margin:0 ;
    padding:0 ;
}
#sidebar {
    height: 600px;
    width: 200px;
}

#topside {
    height: 108px;
    background-image: url(Untitled-3.jpg);
    background-repeat: repeat-x;
    text-align: center;
    position: relative;
}
.down {
    bottom: 3px;
    position: absolute;
    margin: auto;
    width: 200px;

}
#bottomside {
    background-image: url(Untitled-4.jpg);
    height: 492px;
    position: relative;
}
#wrapper #sidebar #topside {
    color: #FFF;
    font-size: 0.9em;
    font-weight: bold;
}
.delhi {
    font-size: 1.8em;
}
.top {
    top: 3px;
    position: absolute;
    margin-left: auto;
    margin-right: auto;
    width: 100px;

}
</style>
</head>

<body>
<div id="wrapper">
    <div id="sidebar">
      <div id="topside"><br /> <span class="delhi">Delhi </span> Questions and answers.
     <div class="down">
    Ask any question & get  
    </div>
      </div>
      <div id="bottomside">
      <div class="top"> answers on </div>
      </div>
    </div>

</div>
</body>
</html>

would anyone like to point out what I am missing here?

  • 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-22T16:51:20+00:00Added an answer on May 22, 2026 at 4:51 pm

    As kuroir’s answer says, you can’t center elements this way if you’re also using absolute positioning.

    Your “ask any question” div isn’t being centered, you’ve given it the same width as its container.

    The only reason the two look different is that there’s a text-align: center on the #topside container, and not on the #bottomside container.

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

Sidebar

Related Questions

Reference is this page: http://demo.mypreviewbetasite.com/laverona/menu.html File in question: http://demo.mypreviewbetasite.com/laverona/scripts/menu.js The page works as expected
The clang 3.0 online demo page http://llvm.org/demo/index.cgi provides an option to output LLVM C++
I was reading the code in the official demo page for slider: http://jqueryui.com/demos/slider/ and
I am trying to set up so that my default page http://demo.liginsurance.com/ goes to
So I have this page that has some basic custom tabs: http://demo.unlockedmanagement.com/users/view/2 * NOTE
Here is a demo page: http://bridgetandmisha.com/resize_sizes.html# Why am i unable to resize one of
Here's the demo page: http://www.scirra.com/stuff/startpage.html As you can see the popup has a shadow
I have set up a demo on this page : http://permanaj.net/jqgrid/index.html code: <html> <head>
Apparently, the demo page on the http://twitter.github.com/bootstrap/javascript.html#carousel seems to have carousel stop rotating after
Please visit this page: http://hyindia.com/demo/agenda/index.html On Top Menu, You can see the Buttons/Links and

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.