wordplay Posted October 21, 2018 Share Posted October 21, 2018 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 Link to comment Share on other sites More sharing options...
microspace Posted October 22, 2018 Share Posted October 22, 2018 You need to place div contained with an id attribute: https://stackoverflow.com/a/21053003/1402321 Link to comment Share on other sites More sharing options...
Recommended Posts