Jump to content

DOM Element Issue - DIv container positioned offscreen - Chromium Browers - Phaser 3 - 3.55


Recommended Posts

Good Day

I configured my game for DOM Elements, and the div container that's getting placed is under my canvas, instead of on top of the canvas, only on Chromium based browsers, on Firefox the div is set on top correctly.

Example: (Chromium):





I found on Chromium - Linux, I can target the overlap with the following selector, but is there a better way to go about this?

body > div:nth-child(12) {
  position: absolute;
  top: 0;
  left: 0;

This is my game config:

this.config = {
  type: Phaser.AUTO,
  dom: {
    createContainer: true,
    behindCanvas: true
  scale: {
    mode: Phaser.Scale.FIT,
  height: 940,
  width: 1840,
  scene: [ StartScene,
           FinalScene ],
  parent: "gameContainer",

Has anyone seen this behavior before?  I'm using Angular 12 with the framework. Is there a better selector that won't require a child selector?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...