How do I center expoter project.

  • I exported my game and hosted it on Google Drive.

    Only problem is that project is displaying in the top middle of the page, right under bookmarks bar.

    Is there any way to move it?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You may need to modify the index.html file to center it. Open that file and look for something like:

    <div id="c2canvasdiv" style="width: 538px; height: 349px; margin-left: 242px; margin-top: 0px;">

    That div contains your game. You may need to change the margin-top:0px to something like margin-top:200px.

    This is a static solutions, it will leave a space of 200 pixels on the top. To really center divs, you should take a look at google for the keywords: html vertical align.

    Tell me if it helps!

  • You may need to modify the index.html file to center it. Open that file and look for something like:

    <div id="c2canvasdiv" style="width: 538px; height: 349px; margin-left: 242px; margin-top: 0px;">

    That div contains your game. You may need to change the margin-top:0px to something like margin-top:200px.

    This is a static solutions, it will leave a space of 200 pixels on the top. To really center divs, you should take a look at google for the keywords: html vertical align.

    Tell me if it helps!

    Thanks alot! This is exactly what I was looking for!

    Just some info for people who might look for the same thing:

    Exported index.html contains:

    <div id="c2canvasdiv" style="margin: 0 auto; width: *your project width*px; height: *your project width*px;">

    Just add margin-top: *size you want*px; somewhere in this brakets.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)