Remove Margin from body in index.html

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi all,

    I'm trying to remove the margin the browser shows on the body element in the index.html.

    When i load the page in the browser (chrome) I see a margin around the canvas. (the black background becomes visible). I can remove the margin by adding 'margin: 0;' in chrome, to the body element.

    But when i add this in the index.html upload the page and refresh the online webpage, nothing happens. I've checked the source code of the page. No extra css. After that i checked the file on the server, there is extra css!

    It looks like the extra css is removed from the index.html as soon as the page loads.

    Any suggestions how to tackle this?

    Thanks in advance!


    EDIT: I think i posted in the wrong forum. Should be "how do i". Sorry

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As described in this tutorial, you also need to change the offline.appcache file before browsers will think there's an update to your game.

  • Thanks for your reply. Changing the offline.appcache file didn't work. I do not export the project again when i change the index.html.

    But as soon i understood what the offline.appcache file did, i knew that clearing the cache of the browser would work. And it did!


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