Jump to content

Cannot place game between two other divs


wordplay
 Share

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">
  <head>
    <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>
  </head>
  <body>
    <h1>This is a test</h1>
    <div class="game">
      <script type="text/javascript" src="testgame2/game2.js"></script>
    </div>
    <h2>this is a second test</h2>
  </body>
</html>

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

Screenshot_2.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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