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

The Archive Base Latest Questions

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

How do I overlap a div on the top of another div on screen

  • 0

How do I overlap a div on the top of another div on screen resize. Below is my html. I want the white div to go on top of another red div, when the screen is dragged from right to left. Right Now the white div just goes beneath the red div.

below is my html:

<div id="red">RED DIV</div>
<div id="white">WHITE DIV</div>

#red{
     background:red;
     width:100px;
     height:100px;
     float:left;
     margin: auto 0;
     z-index:2
}
#white {
    background:white;
    width:100px;
    height:100px;
    margin: auto 0;
    float:left;
    position:relative;
    left:20%;
    z-index:200;
}

EDIT: Please don’t tell me to use position absolute. I want the text from the right side of white div to be trimmed on resize…

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

    You need to add a position:absolute to the white div.

    EDIT – updating to your position absolute statement – even though you’re probably just not doing it correctly

    ….

    RE-EDIT – “I want the text from the right side of white div to be trimmed on resize” … I’m not sure I understand this line. The white div goes on top, right? AND it has a defined width of 100px, which will not change at all when you resize the screen. What is being trimmed and why? Do you mean you want the RED div to wrap the text that is being covered up by the WHITE div that is going on top as per your statement here: “I want the white div to go on top of another red div”
    You will need to clarify your needs before I can help on this one.

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

Sidebar

Related Questions

<div style=position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px;> <div style= border:
Here's the HTML <div class=panel id=Panel1> <fieldset style=position: absolute; top:8px; left: 136px; width: 136px;
I need to place two images into top-left and top-right corners of a web
In the example below there is a blue div followed by a red div
How can I overlap 3 <div> so that the middle <div> is on top
I'm trying to figure out how to overlay a div on top of an
Is there a way to overlay/overlap two or more images using one div only?
I'm using the jQuery code below to launch an overlay div and it works
I am having trouble getting a background-image to overlay the border of another div.
I want overlap the border-bottom of <span> above the border-bottom of <h1> . In

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.