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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:57:20+00:00 2026-05-26T11:57:20+00:00

I would like the settingsBox element to float over the canvas rather than below

  • 0

I would like the settingsBox element to float over the canvas rather than below it. What can I change in my style sheet to achieve the intended result?

<!DOCTYPE html> 

<html>

    <head>

        <style>

            body {
                text-align: center;
                margin: 0px;
            }

            #fullCanvas {
                width: 100%;
                height: 100%;

                background-color: blue;
                z-index: 0;
            }

            #settingsBox {
                width: 400px;
                height: 400px;
                z-index: 1;

                border: 2px solid black;
                background-color: lightgrey;

                padding-left: 0;
                padding-right: 0;
                margin-left: auto;
                margin-right: auto;
                margin-top: 25px;
            }

        </style>

        <script>

function hideSettings() {
    document.getElementById('settingsBox').style.visibility = 'hidden';
}

        </script>

    </head>

    <body align="center">
        <canvas id="fullCanvas">
            This site requires html5 etc
        </canvas>
        <div id="settingsBox" onclick="hideSettings()">
            Settings go in here. Click to hide
        </div>      
    </body>

</html>
  • 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-26T11:57:20+00:00Added an answer on May 26, 2026 at 11:57 am

    First, you have a little spelling mistake, you wrote position: abolute for your fullCanvas element, it should be:

    #fullCanvas {
        position: absolute;
        // your other styles
    }
    

    and in order for z-index to work you have to set the position of the respective elements to absolute, fixed or relative, that means you will have to set your settingsBox to position: relative like this:

    #settingsBox {
        position: relative;
        // your other styles
    }
    

    apart from that you’re code looks good to me

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

Sidebar

Related Questions

I would like to know, whether the url below by google can change in
Would like to maintain a map/hash of DOM objects. Can they serve as key
Would like to see if someone can help me on figuring out how to
would like to know how can this be implemented in Joomla. I have a
Would like to know options in 3D graphics engines out there that can even
would like to build an app that can run on any of the new
Would like to turn this into black and white.. can't figure out what to
Would like to set cookies from the server (CGI - C) Can it be
Would like opinions on the best way to go. As you can see int
Would like to both filter and convert a List. I can filter but cannot

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.