• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Kongregate HTML5 Publishing: how to remove scrollbars?

R

Rohan Jose

Guest
this happens with every HTML5 game published with GMS2, if any of you solved the scrollbar issue (where kongregate instantiates scrollbars for your game) please tell.

This has been bothering me, because the scrollbars really interfere with the look of the game.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
IIRC this is a matter of adding one line to the <style> element in generated HTML,
Code:
body { overflow: hidden }
(might have been "html" instead of / together with "body")
 
R

Rohan Jose

Guest
<!DOCTYPE html>
<html lang="en">
<head
<!-- Generated by GameMaker:Studio (YoyoGames Site)-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="pragma" content="no-cache"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta charset="utf-8"/>
<!-- Set the title bar of the page -->
<title>Made in GameMaker Studio 2</title>
<!-- Set the background colour of the document -->
<style>
body { overflow: hidden }
body {
background: ${BACKGROUND_COLOUR};
color:#cccccc;
margin: 0px;
padding: 0px;
border: 0px;
}
canvas {
image-rendering: optimizeSpeed;
-webkit-interpolation-mode: nearest-neighbor;
-ms-touch-action: none


I've added body { overflow : hidden } but scrollbars still spawn. Any thoughts?

IIRC this is a matter of adding one line to the <style> element in generated HTML,
Code:
body { overflow: hidden }
(might have been "html" instead of / together with "body")
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Generated by GameMaker:Studio http://www(dot)yoyogames(dot)com/gamemaker/studio -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="pragma" content="no-cache"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta charset="utf-8"/>
<!-- Set the title bar of the page -->
<title>Made in GameMaker Studio 2</title>
<!-- Set the background colour of the document -->
<style>
body { overflow: hidden }
body {
background: ${BACKGROUND_COLOUR};
color:#cccccc;
margin: 0px;
padding: 0px;
border: 0px;
}
canvas {
image-rendering: optimizeSpeed;
-webkit-interpolation-mode: nearest-neighbor;
-ms-touch-action: none;

I've done that but I still experience scrollbars, any thoughts ? (I've added body {overflow : hidden } directly to the HTML document.)
 
Last edited by a moderator:

MudbuG

Member
I recently found a worked-around for this problem by telling Kongregate that my game is a few pixels wider and taller than it actually is. I used 4 pixels, less might work, but I didn't try it. I think you will need to re-upload your game to get the size input option on Kongregate.
 
Top