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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:24:05+00:00 2026-06-14T07:24:05+00:00

I’m busy with creating a website that preferably needs to have a background picture

  • 0

I’m busy with creating a website that preferably needs to have a background picture that covers the whole screen but when the visitor scrolls down other content appears.

So far I got this working with creating 2 div’s (which I call #container_page1 and #container_page2). This is the css of the first div:

#container_page1 { 
    background-image:url(images/background.jpg); 
    background-size: cover;
    position:absolute;
    margin:0px;
    width:100%;
    height:100%;
}

This is the css of the second div:

#container_page2 {
    background-color: #F00;
    height: 2000px;
    width: 1000px;
    margin-right: auto;
    margin-left: auto;
}

The problem is that the content of the second div appears underneath the first div, obviously caused by the fact that the first div is absolute positioned.

Of course I could get the content of the second div to be placed lower with margin or padding but this won’t work nicely because of different screen resolutions.

Here you can see what I did so far: http://kmnew.kadushimarketing.com/index.php. You’ll also see the “learn more” button that links to an anchor in the second div.

Does anyone has a suggestion to get the second div starting where the first div ends?

  • 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-14T07:24:06+00:00Added an answer on June 14, 2026 at 7:24 am

    If you need each section to have it’s own special background and be exactly the size of the browser, why do absolute position at all?

    Using a style like:

    body, html{
        width:100%;
        height:100%;
        margin:0;
        padding:0;
    }
    
    section{
        width:100%;
        height:100%;
        background-image:url(images/background.jpg); 
        background-size: cover;
    }
    

    Then positioning all your content divs relative, you should be able to maintain browser-sized background and let the sections stack in order.

    If you want to control the position of the section contents you could use a structure like:

    <section>
        <div class="content">
            Section content goes here
        </div> 
    </section>
    

    With corresponding CSS:

    section .content{
        width: 500px;
        margin:0 auto;
    }
    

    Which would fix the content to a width of 500px and center it on the screen. Hope this helps!

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites 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.