Jump to content

Cannot place game between two other divs


Recommended Posts

Hi there, Im new to phaser and am having trouble with integrating it with my HTML page.

Im trying to place the game between two bodies of text rather than at the end of the page.


<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <title>Test Game</title>
    <script type="text/javascript" src="testgame/phaser.js"></script>
    <script type="text/javascript" src="testgame/phaser.min.js"></script>
    <h1>This is a test</h1>
    <div class="game">
      <script type="text/javascript" src="testgame2/game2.js"></script>
    <h2>this is a second test</h2>

I have also attached a screenshot of the output, which shows that the game always gets placed after all the content in the page, rather than between the two bodies of text as desired. 

Any advice on this would be helpful.

Thank you in advance


Link to comment
Share on other sites


  • Recently Browsing   0 members

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