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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:53:48+00:00 2026-05-26T05:53:48+00:00

I got this problem trying to get the header-bg div to always be the

  • 0

I got this problem trying to get the header-bg div to always be the full browser width.

I have a background image with some clouds and when I use ctrl+scroll the image stays the original width and stays left aligned. At original page view the bg is perfect 100% width, but I want it to be perfect with al screen widths. Is this even possible or am I wrong?

Heres the code:

body, html {
    height:100%;
    width:100%;
    margin:0;
    padding:0;} 


#header-bg {
    background-image:url(images/header/header-bg.jpg);
    background-repeat:no-repeat;
    min-width:100%;
    width:100%;
    margin:0;
    position:fixed;
    height:402px;}

<div id="header-bg">
<div id="header">
<div id="navigation">
</div>
</div>
</div>

Thanks for looking!

  • 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-26T05:53:49+00:00Added an answer on May 26, 2026 at 5:53 am

    By default, the background image cannot resize. The background-size property has to be used to get your background to fill the whole DIV:

    #header-bg {
         background-image: url(images/header/header-bg.jpg);  
    
        -moz-background-size: 100% 100%;
        -o-background-size: 100% 100%;
        -webkit-background-size: 100% 100%;
        background-size: 100% 100%;
        /*Other CSS*/
    }
    

    This CSS feature is supported by:

    • Firefox 3.6+
    • Opera 9.5+
    • Chrome 1+
    • Safari 3+
    • Internet Explorer 9+

    If you cannot use this property, your only remaining option is using a <img> element.
    Fiddle: http://jsfiddle.net/Hf79s/

    <style>
    #header-bg{
        width:100%;
        height: 50px;
    }
    #header-bg-img {
        height: 100%;
        width: 100%;
    }
    </style>
    <div id="header-bg">
        <img src="images/header/header-bg.jpg" id="header-bg-img" />
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to get some background images around a content div. Thing is, the
I'm trying to use reflection for some reason and I got into this problem.
The responses I've got to this question have solved the problem I had in
Hey there, i got this very annoying problem: I have a CheckBoxList getting items
I've got a problem trying to get python to accept an import 'globally' In
Coding in VB.Net Hi guys I've got this problem where I'm trying to assign
I've got this weird problem - I'm calling ChangeServiceConfig on a newly installed service
I've got this nasty problem where sending multiple, large messages in quick succession from
I’ve got this strange problem whereby the content within a scroll viewer increases in
I got stuck in this problem for an hour. I am thinking this is

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.