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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:46:42+00:00 2026-05-15T05:46:42+00:00

html, body {margin: 0px; padding: 0px;} #pageContainer{ margin: auto; padding: auto;} #contentContainer{ margin:150px; width:1100px;

  • 0
html, body {margin: 0px; padding: 0px;}

#pageContainer{ margin: auto; padding: auto;}
#contentContainer{ margin:150px; width:1100px; height: 100%; overflow: hidden; }
#leftContainer{ width: 80%; min-height: 800px; background: #009900; float:left;}
#left1{ margin:80px 0 0 80px; height: 550px; top:0px; z-index:1; background: #000000;}
#left2{ margin:80px 0 0 80px; height: 500px; top:110px; z-index:2000; background:#99FFFF; }
#rightContainer{ width: 20%; height: inherit; background: black; float:right;}

/ CSS Document */

I require 2 overlapping divs, which look like the one below.

    ----------------------
   |                      |
   |   ------------------ |
   |  '                  '|
   |  '                  '|
   |  '                  '|
   |  '                  '|
   |  '                  '|
   |  '                  '|
   |  '                  '|
    ----------------------
      '                  '
      '                  '
       -------------------


<div id="pageContainer">
  <div id="contentContainer">
    <div id="leftContainer"> Am the left container 
      <div id="left1"> 
          <div id="left2">
          </div>
      </div>
    </div>
    <div id="rightContainer">

    </div>
  </div>
</div>

The problem is am failing to get the overlap. Where am I going wrong?

Edit 1: topx was a typo, corrected it.

  • 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-15T05:46:43+00:00Added an answer on May 15, 2026 at 5:46 am

    You need to use position: relative (absolute or fixed work as well but they will give you different results) to get them to overlap as stated at W3Schools. You need to add them to #left1 and #left2. It should be left or top, there is no topx.

    You can fiddle with it here at jsfiddle.

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

Sidebar

Related Questions

<html style=margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;> <body style=height:100%;width:100%;> <div style=height:20px;background-color:red;></div> <div style=background-color:black;></div>
The following Code <!DOCTYPE html> <html> <head> </head> <body> <div style=width:200px;height:200px;padding:0px;margin:0px;> <div style=background-color:red;position:relative;display:block;text-decoration:none;padding:0px;margin:0px;> <img
Pls help!!! CSS: body { margin: 0px; padding: 0px; } body #header { width:100%;
In my HTML file, I have: <html><head> <style>html{width: 320px; } body {padding: 0; margin:
I have a following HTML/CSS (simplified): <body> <style> body { margin: 0px; padding: 0px;
I have this pure code in HTML <body style=margin:0px; padding:0px; onload=load()> <div> <input type=text
html, body { margin: 0px; padding: 0px; font: normal 14px/16px Helvetica, Sans-serif; } body
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN> <html> <head> <style type='text/css'> #body{ margin:0px; }
I have my css as shown here body { margin:0px auto; font-family:Arial,Helvetica,sans-serif; font-size: 12px;
Here's teh codez: <!DOCTYPE html> <html> <head> <title>Test</title> <style type=text/css> html, body { margin:

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.