Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8112923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:39:54+00:00 2026-06-06T02:39:54+00:00

A simple example of what I’d like to achieve: <body> <div style=float:left;> Hey, look

  • 0

A simple example of what I’d like to achieve:

<body>
    <div style="float:left;">
        Hey, look to the right. There's my game!
    </div>
    <div id="mygame">
        <script src="mygame/mygame.nocache.js"></script>
    </div>
</body>

The problem is: the PlayN javascript appears to append the canvas comprising my game to the end of the DOM and reset the body attributes to match the canvas size. So the game always ends up at the bottom of the screen.

I suppose I could add some javascript to rearrange the layout after the canvas is loaded. Is it possible to have the canvas loaded into a specified element?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:39:55+00:00Added an answer on June 6, 2026 at 2:39 am

    Add id=”playn-root” to the element you want to have the game canvas in.

    At startup, PlayN looks for this id. If found, the game canvas is added inside the corresponding element. Otherwise, it is appended to the body element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try the following simple example: <html> <head> <style> div, input { border: 1px solid
Simple example: $(document).ready(function(){ $('body').css({'background-color': '#dddddd', 'font-size': '12pt'}); $('table tr:odd').addClass('rowShaded'); $('<p> Oh my learning jQuery
Is there a simple example of how to have a combobox show a datagrid
Simple example. I have 2 styles declared in UiBinder: <ui:style> .success { font-size: 13px;
when using simple example like at https://developers.facebook.com/docs/reference/dialogs/oauth/ after auth box prompting for additional permissions
i have this simple example here : http://jsfiddle.net/pTyvc/1/ i don't want the sub_menu div
Simple example spring controller (if you're not familiar with spring, just look at the
Is there a simple example to read/write metadata of e.g. a local .jpg? XMPCore
I'd like a simple example of exporting a function from a C++ Windows DLL.
Simple example.. Response.Redirect(/store/packages.aspx); I'd like to reference /store/packages.aspx directly from the web.sitemap file, if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.