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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:06:35+00:00 2026-06-01T22:06:35+00:00

i am i am new in CSS.. i have converted my psd file into

  • 0

i am i am new in CSS.. i have converted my psd file into html/css.. now i want to move my webpage page into center of the window.. i tried some code and that code align only text the background image “back.gif” remains at left.. here is my html and CSS code”

**HTML**

<body>
<div id="main">

      <div id="header">
     <div id="logo">
            <img src="logo.gif" />
         </div>
      </div>

     <div id="menu">
     <img src="images/menu_07.gif" />
           <div id="m">
             <ul>
               <li> <a href="index.php">Home</a></li>
               <li> <a href="pages.php">Pages</a></li>
               <li> <a href="donor.php">Donor</a></li>
               <li><a href="seeker.php">Seeker</a></li>
               <li><a href="hospitals.php">Hospitals</a></li>
               <li><a href="lifesaving.php">Life Saving Contacts</a></li>
               <li><a href="contactus.php">Feedback</a></li>
             </ul>
           </div>
     </div>

     <div id="content">
     <div id="center" align="center">
             <h3>WELCOME TO ADMIN AREA</h3>
             <p id="ajk">AJKBLOODBANK.COM</p>
         <?php
              echo "welcome!".$_SESSION['username'];
              echo "<br>";
              echo "<a href=logout.php>Logout</a>&nbsp;";
             ?>
         </div>
     </div>

     <div id="footer">
     </div>
</div>
</body>


**CSS**
body
{

    background:url(../back.gif) repeat-y;   
    padding-left:105px;
    height:900px;
    text-align: center;
    margin:auto;
    min-width: 760px;
}
div#main 
{
    width: 720px;
    margin: 0 auto;
    text-align: left;
}

#header
{
    width:787px;
    margin-top:10px;
}

#menu
{

    width:787px;    
    float:left;
    margin-top:20px;

}

#content
{
    background-color:#FFF;
    border:groove;
    width:790px;
    float:left;
    padding-top:30px;
    margin-top:30px;
}
#footer
{
        float:left;
        height:52px;
        width:790px;
}

Please tell me where i made mistake ..

the diameseion of background image "backgif" = 995x1000
  • 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-01T22:06:37+00:00Added an answer on June 1, 2026 at 10:06 pm

    Whichever element you want centered – set an explicit width and then set left/right margins to auto

    #main { width:995px; margin:0 auto; }
    

    …this will center the element in its parent. If you were to center #main, it would be centered on the page (assuming your body has 100% width)

    EDIT

    Try making your background image apply to #main instead of body. Or, center the background image using background-position, or shorthand:

    body { background:url(../back.gif) repeat-y center top; } 
    

    Cheers

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

Sidebar

Related Questions

I have CSS and HTML that I will be converting into PDF. I want
I have a drop down menu with css file and i want to convert
I am pretty new at CSS but have been learning, doing my moms small
I have make a new dropdown navi in css . Chrome, firefox, safari is
I have installed a complete blank theme with no CSS in my new wordpress
How to add new css class or id and then write properties for html
Since i am new to CSS, i am not sure if the following page
I'm not new to HTML, CSS, JS or PHP, I already made diff. web
I have a code that reads an HTML file from my local web server
I'm pretty new to CSS and have found a nuance that I don't understand.

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.