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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:31:29+00:00 2026-05-28T14:31:29+00:00

I want to put a background (width = 1250px) centered on page, but the

  • 0

I want to put a background (width = 1250px) centered on page, but the container, should have the width of browser

This center the background:

#container{margin:0 auto;background:#000 url("images/background.jpg") no-repeat;width:1250px;;}

And this set the width of container = the browser

#container{margin:0 auto;background:#000 url("../../../images/background.jpg") no-repeat;width:100%;position:relative;}

How to get centered background image and full page container?

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-28T14:31:29+00:00Added an answer on May 28, 2026 at 2:31 pm

    Change your background rule to this:

    background:#000 url(images/background.jpg) center center no-repeat;
    

    Or if you want to center it at the top of the page, do this:

    background:#000 url(images/background.jpg) center top no-repeat;
    

    Then you can remove the margin: 0 auto because it’s useless with a width of 100%.

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

Sidebar

Related Questions

I have a page layout for my MOSS '07 site that I want put
i have a php page it have css script. i want to put menubar
I have this code. http://jsfiddle.net/ozzy/YGhkW/ What I want to do is, to put the
I have nav a bar on my site but I want to put rounded
hey, hi i want put limit on object creation means a class can have
I want to put a sharpen filter on an image. I have found a
i want to put the id into the colorbox below this code nom works
I have put a logo as the background image in a div <div id=logo
thanks for help, ended up with this html{ position:relative; min-width:950px; height:100%; background:black url(images/GrassBG.png) repeat-y
I'm just trying to put a background image on a webpage with 100% width

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.