mtkachenko Posted January 3, 2017 Share Posted January 3, 2017 I want to put my phaser game into div like on picture below. Now I use var game = new Phaser.Game('90', '100', Phaser.CANVAS, 'game-container') for game, an this layout <div>HEADER</div> <div id="palyers-container" style="float: right;">dasdada sdasda</div> <div id="game-container" style=""></div> So now I have a vertical scroll (not good) and players-container works in a bad way while resizing browser window. How to fix it? Link to comment Share on other sites More sharing options...
erich Posted January 3, 2017 Share Posted January 3, 2017 why not use an iframe for the game ? Link to comment Share on other sites More sharing options...
mtkachenko Posted January 3, 2017 Author Share Posted January 3, 2017 I want to show list of players, their scores etc. and chat between players in "game info" section. Having game in iframe will increase complexity and require interaction using postMessage. Link to comment Share on other sites More sharing options...
drhayes Posted January 3, 2017 Share Posted January 3, 2017 It really depends on what you're trying to achieve and how what you have now isn't letting you achieve it. You should probably look into using flexbox (depending on what browsers you're targetting) and, possibly, setting "overlay: none" as a CSS property on whatever div it is that has a vertical scroll in it (I'm not sure which one that is). Link to comment Share on other sites More sharing options...
Recommended Posts