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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:22:36+00:00 2026-06-17T13:22:36+00:00

Sorry if this was asked before but I read and did not see my

  • 0

Sorry if this was asked before but I read and did not see my mistake.I try to center the #wrapper with margin:0 auto; but nothing happens…the width is set also.

This is the CSS:
I want the hole page to be centerd

@charset "utf-8";
body {
    margin-left:0px;
    margin-top:0px;
    margin-right:0px;
    margin-bottom:0px;
    padding:0;
    background-color:#000000;
    text-align:center

}
#wrapper {
    width: 901px;
    ***margin: 0 auto;***
}
#header {
    background-image: url(images/banner.jpg);
    background-repeat: no-repeat;
    float: left;
    height: 233px;
    width: 901px;
}
#menu {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url(images/menu.gif);
    background-repeat: no-repeat;
    text-align: center;
    word-spacing: 70px;
    padding-top: 17px;
    float: left;
    height: 33px;
    width: 901px;
}
#main {
    float:left;
    height:auto;
    width:901px;
}
#leftcol {
    float:left;
    height:auto;
    width:300px;
    padding-top:5px;
    padding-right:0px;
    padding-bottom:0px;
    padding-left:30px;
}
#rightcol {
    float:right;
    height:auto;
    width:500px;
    padding-right:35px;
    margin-right:0px;
}
#footer {
    font-family:Arial, Helvetica, sans-serif;
    font-size:x-small;
    float:left;
    height:250px;
    width:900px;
    color:#666666;
    clear:both
}

Also the html:

this is the basic html file

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="wrapper">Content for  id "wrapper" Goes Here</div>
<div id="header">Content for  id "header" Goes Here</div>
<div id="menu">Content for  id "menu" Goes Here</div>
<div id="main">
  <div id="leftcol">Content for  id "main" Goes Here</div>
  <div id="rightcol">Content for  id "rightcol" Goes Here</div>
  <div id="footer">Content for  id "footer" Goes Here</div>
</div>
</body>
</html>
  • 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-17T13:22:37+00:00Added an answer on June 17, 2026 at 1:22 pm

    You need to give body (your element’s parent) a width :

    html, body{
        width:100%;
    }
    

    Besides, considering your markup, if you want the whole site to be centered, you should use your #wrapper as an actual wrapper, meaning it should include the other content nodes :

    <body>
    <div id="wrapper">
        <div id="header">Content for  id "header" Goes Here</div>
        <div id="menu">Content for  id "menu" Goes Here</div>
        <div id="main">
            <div id="leftcol">Content for  id "leftcol" Goes Here</div>
            <div id="rightcol">Content for  id "rightcol" Goes Here</div>
            <div id="footer">Content for  id "footer" Goes Here</div>
        </div>
    </div>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sorry if this has been asked before, but I did try digging through
Sorry if this has been asked before, I did check but couldn't find anything...
I'm sorry if this question has been asked before, but I'm not even sure
Sorry if this has been asked before, but I couldn't find a good example
Sorry if this has been asked before, but I'm wondering what the best memory
sorry if this questions is overly basic or has been asked before but I
Sorry if this has been asked before or it's a really dumb question, but
Sorry if this has been asked before but I cannot find the answer anywhere..
Sorry if this has been asked before but I've tried searching and can't find
Sorry if this question has been asked before but I couldn't find a good

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.