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

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...