przemoo83 Posted February 18, 2015 Share Posted February 18, 2015 HiI'm trying to develop an interactive application that uses Bootstrap for styling and RWD and Phaser for displaying animations. I came accross an issue with a canvas element. If I create through Phaser like this:var conf = new Phaser.Game(800, 600, Phaser.AUTO, 'canvas', { preload: preload, create: create, update: update });I have problem with the responsiveness of the element. Normally I would style canvas like this and it stays in its container:HTML<div class="container"> <div class="row"> <div id="controlPanel" class="col-xs-4"> </div> <div id="animation" class="col-xs-8"> <canvas></canvas> </div> </div></div>CSScanvas {width: 100%;height: auto;}However with Phaser it's not responsive anymore. Anyone knows how to fix that? Link to comment Share on other sites More sharing options...
przemoo83 Posted February 18, 2015 Author Share Posted February 18, 2015 Ok i fixed it by adding some "!important" lines to css file. Not very elegant solution but it works:) This topic can be closed Link to comment Share on other sites More sharing options...
Recommended Posts