Center exported game Forum Home > Construct 2 General > How do I....? |
Post Reply
|
| Author | |
Post Options
Quote Reply
Topic: Center exported gamePosted: 22 Apr 2012 at 1:40pm |
|
|
Hi!
What i need to edit the index.html file to center my exported game in the preview: ![]() instead of the default exported: ![]() Edited by 01lifeleft - 23 Apr 2012 at 5:38am |
|
|
Rolling...
|
|
![]() |
|
Post Options
Quote Reply
Posted: 22 Apr 2012 at 8:26pm |
|
|
You could put some break returns <br> in before the game in the index file. That'll push everything down from the top.
|
|
![]() |
|
Post Options
Quote Reply
Posted: 22 Apr 2012 at 8:49pm |
|
|
You basicly need to use the same CSS style in the exported version that the one present in the preview version for the <canvas> object.
Have a look at how to customize the exported html5 index.html to learn more. Edited by Kyatric - 22 Apr 2012 at 8:49pm |
|
![]() |
|
Post Options
Quote Reply
Posted: 22 Apr 2012 at 9:35pm |
|
|
Just view source and copy the divs and css from the preview.
Horizontal centering is easy, but vertical centering is trickier - that's what the three levels of <div>s are for :P I thought I'd keep it simple in the export so it's easy for people who know HTML to customise. |
|
![]() |
|
Post Options
Quote Reply
Posted: 23 Apr 2012 at 5:35am |
|
|
Thanks guys!
I used Ashley's method and now it's totally looks like the preview, thanks very much! ![]() And that tutorial is very useful, Kytric. :D Edited by 01lifeleft - 23 Apr 2012 at 5:43am |
|
|
Rolling...
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |