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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:43:52+00:00 2026-05-15T23:43:52+00:00

I have overlay inside HTML element and inside that overlay I have element that

  • 0

I have overlay inside HTML element and inside that overlay I have element that contains message. But for some reson upper element gets also opacity from element under it.

EDIT: I only have tested this with latest Firefox.

Here is CSS example code to explain problem:

.overlay {
    z-index: 1000;
    border: medium none;
    margin: 0pt;
    padding: 0pt;
    width: 100%;
    height: 100%;
    top: 0pt;
    left: 0pt;
    background-color: #fff;
    opacity: 0.6;
    cursor: wait;
    position: absolute;
}
.overlay .message {
    z-index: 1001;
    position: absolute;
    padding: 0px;
    margin: auto;
    width: 30%;
    top: 15%;
    left: 30%;
    text-align: center;
    color: #fff;
    border: 3px solid red;
    background-color: #fff;
    background: fuchsia;
    font-size: 18px;
    font-weight: bold;
    padding: 5%;
}

And here is HTML code:

<div class="overlay">
    <div class="message">
        test
    </div>
</div>
  • 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-15T23:43:53+00:00Added an answer on May 15, 2026 at 11:43 pm

    The opacity effects not just the element itself but everything in overlay (so message too). It works if you separate the overlay and the message:

    <div class="modal">
        <div class="overlay">overlay</div>
        <div class="message">message</div>
    </div>
    

    And the CSS:

    .modal {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    .overlay {
        /* … */
    }
    .message {
        /* … */
    }
    

    Here message is not a descendant of overlay and thus not affected by overlay’s style.

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

Sidebar

Related Questions

I have an overlay that gets triggered by JS with some scrolling content inside
I have an overlay that I created with a width of 700px and height
I have an overlay that I want to hide on mousedown outside it. Here
I have a overlay delay on my html page, if the page couldnt load
I currently have implemented an overlay item that shows an icon for Geo-point on
I have a simple camera app, that has a AVCaptureVideoPreviewLayer inside a View. I
What a mouthful. Basically I have a parent <div> and inside that an <iframe>
I have a min-height 100% div that contains all the content of my website:
I'm currently trying to display some information (as an overlay) to the user inside
I need to have a single <li> element which has two buttons inside of

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.